Documentation ¶
Index ¶
- func Listen(filename string, dnsServer *srvdns.ServerPtr, httpServer *srvhttp.ServerPtr, ...)
- func TryReloadConfig(fileName string, dnsServer *srvdns.ServerPtr, httpServer *srvhttp.ServerPtr, ...)
- func UpdateCRConfigPoller(crConfigPoller *poller.Poller, crConfigIPoller *pollercrconfig.IPoller, ...)
- func UpdateCRStatesPoller(crStatesPoller *poller.Poller, crStatesIPoller *pollercrstates.IPoller, ...)
- func UpdateCerts(certs map[string]*tls.Certificate, certGetter *srvhttp.CertGetter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func Listen( filename string, dnsServer *srvdns.ServerPtr, httpServer *srvhttp.ServerPtr, certGetter *srvhttp.CertGetter, crStatesPoller *poller.Poller, crStatesIPoller *pollercrstates.IPoller, crConfigPoller *poller.Poller, crConfigIPoller *pollercrconfig.IPoller, )
Listen starts listening for SIGHUP signals (typical of service reload commands), and reloads the config file when it receives one. The config file it reloads is the one received as a command-line argument on startup. The startup file given may not be changed without a restart. Likewise, the ports being served on require a restart to change. If there is an error loading the config file, the error is logged, and the existing server is left unchanged.
func TryReloadConfig ¶
func TryReloadConfig( fileName string, dnsServer *srvdns.ServerPtr, httpServer *srvhttp.ServerPtr, certGetter *srvhttp.CertGetter, crStatesPoller *poller.Poller, crStatesIPoller *pollercrstates.IPoller, crConfigPoller *poller.Poller, crConfigIPoller *pollercrconfig.IPoller, )
TryReloadConfig attemps to reload the given config file, and set the server pointers to its reloaded state. On error, logs but leaves the servers serving what they were before, does not crash or stop.
func UpdateCRConfigPoller ¶
func UpdateCRStatesPoller ¶
func UpdateCerts ¶
func UpdateCerts(certs map[string]*tls.Certificate, certGetter *srvhttp.CertGetter)
UpdateCerts updates certGetter with certs, deleting certs in the getter and not in certs, and adding to the getter new certificates in certs but not in certGetter.
Types ¶
This section is empty.