in Stable-Diffusion-UI-Agones/agones-sidecar/main.go [581:596]
func doHealth(sdk *sdk.SDK, ctx context.Context) {
tick := time.Tick(2 * time.Second)
for {
log.Printf("Health Ping")
err := sdk.Health()
if err != nil {
log.Fatalf("Could not send health ping, %v", err)
}
select {
case <-ctx.Done():
log.Print("Stopped health pings")
return
case <-tick:
}
}
}