Don't enable health checks by default
This commit is contained in:
parent
7755300638
commit
835c585da9
@ -114,7 +114,7 @@ func getConfig(pathToJSON string) (Config, error) {
|
|||||||
|
|
||||||
// Main is the main function for the cloud-dyndns-client command. It returns the OS exit code.
|
// Main is the main function for the cloud-dyndns-client command. It returns the OS exit code.
|
||||||
func main() {
|
func main() {
|
||||||
addr := flag.String("addr", ":8080", "Address to listen on for health checks.")
|
addr := flag.String("addr", "", "Address to listen on for health checks.")
|
||||||
version := flag.Bool("version", false, "Print the version and exit.")
|
version := flag.Bool("version", false, "Print the version and exit.")
|
||||||
config := flag.String("config", "/etc/cloud-dyndns-client/config.json", "The path to the JSON config file.")
|
config := flag.String("config", "/etc/cloud-dyndns-client/config.json", "The path to the JSON config file.")
|
||||||
|
|
||||||
@ -184,6 +184,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// TODO: Refactor and move to it's own package
|
// TODO: Refactor and move to it's own package
|
||||||
|
if *addr != "" {
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
// This goroutine sets up health checks on an HTTP endpoint.
|
// This goroutine sets up health checks on an HTTP endpoint.
|
||||||
// It's a bit complicated as it is necessary to gracefully
|
// It's a bit complicated as it is necessary to gracefully
|
||||||
@ -216,6 +217,7 @@ func main() {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Wait for SIGINT or SIGTERM signals and shutdown the application if
|
// Wait for SIGINT or SIGTERM signals and shutdown the application if
|
||||||
// one is received.
|
// one is received.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user