mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Even simpler - cancel the GRPC call using the context object passed
to the GRPC clients - thanks @endophage! Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
@@ -113,21 +113,20 @@ func main() {
|
||||
viper.GetString("trust_service.port"),
|
||||
viper.GetString("trust_service.tls_ca_file"),
|
||||
)
|
||||
minute := 1 * time.Minute
|
||||
health.RegisterPeriodicFunc(
|
||||
"Trust operational",
|
||||
// If the trust service fails, the server is degraded but not
|
||||
// exactly unheatlthy, so always return healthy and just log an
|
||||
// error.
|
||||
func() error {
|
||||
logrus.Info("Getting health")
|
||||
err := trust.(*signer.NotarySigner).CheckHealth(5)
|
||||
logrus.Info("Got health")
|
||||
err := trust.(*signer.NotarySigner).CheckHealth(minute)
|
||||
if err != nil {
|
||||
logrus.Error("Trust not fully operational: ", err.Error())
|
||||
}
|
||||
return nil
|
||||
},
|
||||
time.Second*5)
|
||||
minute)
|
||||
} else {
|
||||
logrus.Info("Using local signing service")
|
||||
trust = signed.NewEd25519()
|
||||
|
||||
Reference in New Issue
Block a user