[experiment] caddyfile block type experimnet #342
[experiment] caddyfile block type experimnet #342elee1766 wants to merge 13 commits intomholt:masterfrom
Conversation
|
the ci doesn't build because the replace directive/go.mod doesnt seem to get used for the actual ci build i guess? |
|
Ohhhh this is actually pretty cool. The CI is failing due to a lint error, regarding import formatting/order. |
|
i fixed that lint error, but still have the same lint error as master. |
|
so i think i kept it fully backwards compatible with the global block, in the way that even you can have both? |
|
Hi! Do we expect other layer4 block types? I mean this PR suggests {
admin off
log {
level DEBUG
}
}
[layer4] :5000 {
route {
echo
}
}
[layer4] :5001 {
route {
echo
}
} |
|
it may be wanted to put global configuration for the layer4 module in a [layer4] block instead of [global] block. this was my thought. to me that makes more sense. (plugins should declare their own block to configure their plugin, not inject into global directive) altho ultimately I think it will come down to what is decided for http, if it is [http] or [http.server] for blocks |
|
@elee1766, it makes sense, thanks. By the way, it would be much more informative and let me (and probably others) save time, if you could name your commits in a more elaborate way. You know, commits with "noot", "no idea", etc. don't contribute to understanding what you've done. Though what you're proposing to merge seems to be really valuable. |
|
@vnxme hi. i commit files just to save progress so i can revert for my own work, so there are no messages. they are not meant to be read or contain any context. if you dont want the eyesore on github, i could just not push and squash my commits before i push. (but here they are squashed for merge anyways) usually i try to provide enough context in the PR body, to give context for code changes, but this is still a draft, so i have not written it yet. |
an experiment to see how registering and this plugin would work with caddyserver/caddy#7344
so a caddyfile could look like this