James Shubin
7698b1b5fd
engine: resources: Add an http error wrapper
...
This makes it easier to return errors more succinctly.
2024-02-16 08:06:20 -05:00
James Shubin
e256d886e0
engine: resources: Add a fancy http error wrapper
...
This lets use use a regular error signature but also specify which http
error code we want to return.
2024-02-16 08:06:20 -05:00
James Shubin
7e1a4dea6c
engine: resources: The http:file resource should allow directories
...
This expands the use of the http:file resource to allow it to be used as
a directory root.
2024-01-28 23:16:25 -05:00
James Shubin
0711d05232
engine: resources: http: Improve groupability of resources
...
This improves groupability of http resources so that we can have fancier
kinds!
2024-01-22 20:37:53 -05:00
James Shubin
b670bb8d2c
engine: resources: http: Recurse on Init and Watch
...
Make this resource handle sub-resources more powerfully.
2024-01-22 19:16:28 -05:00
James Shubin
1abf6547ff
engine: resources: http: Improved CheckApply for grouped resources
2024-01-22 19:16:28 -05:00
James Shubin
3739fa401e
engine: resources: Refactor HTTP constants
2024-01-22 17:43:24 -05:00
James Shubin
a8f194259b
legal: Happy 2024 everyone...
...
Done with:
ack '2023+' -l | xargs sed -i -e 's/2023+/2024+/g'
Checked manually with:
git add -p
Hello to future James from 2025, and Happy Hacking!
2024-01-22 15:52:49 -05:00
James Shubin
7ccda7e99b
engine: Add a ctx to the CheckApply API
...
This is just a rough port, there are lots of optimizations to be done
and lots of timeout values that should be replaced by a new timeout meta
param!
2023-09-02 01:34:42 -04:00
James Shubin
514927c0b3
engine: resources, graph: Change the Close method to Cleanup
...
This also changes a few similarly named methods. Clearer what it's doing
in terms of cleanup vs. causing some action.
2023-08-08 01:11:29 -04:00
James Shubin
963393e3d9
engine: graph, resources: Change Watch to use ctx
...
This is a general port. There are many optimizations and cleanups we can
do now that we have a proper context passed in. That's for a future
patch.
2023-08-08 01:11:29 -04:00
James Shubin
53a878bf61
engine: resources, graph: Change the done channel into a ctx
...
This is part one of porting Watch to context.
2023-08-08 01:11:29 -04:00
James Shubin
a7624a2bf9
legal: Happy 2023 everyone...
...
Done with:
ack '2022+' -l | xargs sed -i -e 's/2022+/2023+/g'
Checked manually with:
git add -p
Hello to future James from 2024, and Happy Hacking!
2023-03-05 18:31:52 -05:00
James Shubin
3cea422365
legal: Happy 2022 everyone...
...
Done with:
ack '2021+' -l | xargs sed -i -e 's/2021+/2022+/g'
Checked manually with:
git add -p
Hello to future James from 2023, and Happy Hacking!
2022-08-05 23:06:27 -04:00
James Shubin
336a38081a
legal: Happy 2021 everyone...
...
Done with:
ack '2020+' -l | xargs sed -i -e 's/2020+/2021+/g'
Checked manually with:
git add -p
Hello to future James from 2022, and Happy Hacking!
2021-01-31 16:52:46 -05:00
James Shubin
8f60f42be3
engine: resources: Add http:server and http:file resources
...
This adds a new http server resource, as well as a http file resource
that is used to specify files to serve in that server. This allows you
to have an http server that is entirely server from memory without
needing files on disk.
It does this by using the autogrouping magic that is already available
in the engine.
The http resource is not meant to be a full-featured http server
replacement, and it might still be useful to use the venerable webserver
of your choice, however for integrated, pure-golang bootstrapping
environments, this might prove to be very useful.
It can be combined with the tftp and dhcp resources to build PXE setups
with mgmt!
This resource can be extended further to support an http:flag endpoint,
an http:ui endpoint, automatic edges, and more!
2020-04-11 03:23:04 -04:00