1. My Caddy version (caddy version
):
1.0.5
2. How I run Caddy:
I run caddy with something like this:
func defaultLoader(serverType string) (caddy.Input, error) {
contents := getCaddyFile(caddyConfig)
return caddy.CaddyfileInput{
Contents: []byte(contents),
Filepath: caddy.DefaultConfigFile,
ServerTypeName: serverType,
}, nil
}
func StartCaddy() {
caddy.SetDefaultCaddyfileLoader("default", caddy.LoaderFunc(defaultLoader))
caddyfile, _ := caddy.LoadCaddyfile("http")
caddy.Start(caddyFile)
}
a. System environment:
linux, darwin
3. The problem I’m having:
I would like to specify an external net.Listener
reference that caddy can start with.
Naturally, the net.Listener
should match the one specified in the caddy file.
The use case is: I’m trying to use overseer, which is a self-updater for go binaries, also with zero-downtime for TCP/UDP services. Thus, I would need to create net.Listener
references (or something like this) out of Caddy.
Is that possible, somehow, with the current version?
If not, is this something achievable with the current Caddy architecture? (meaning that, maybe, it could be implemented in v2
?!)