var terminationSignals … // waitForTerminationSignal waits for termination signal. func waitForTerminationSignal() { … } // readinessCheck checks whether services are ready via the supplied health // check URLs. Once there is an error in errCh, the function will stop waiting // and return the error. func readinessCheck(name string, urls []string, errCh <-chan error) error { … } // Perform a health check. Anything other than a 200-response is treated as a failure. // Only returns non-recoverable errors. func healthCheck(client *http.Client, url string) bool { … }