MCPcopy
hub / github.com/grafana/dskit / IsHealthy

Method IsHealthy

services/manager.go:107–112  ·  view source on GitHub ↗

IsHealthy returns true if all services are currently in the Running state.

()

Source from the content-addressed store, hash-verified

105
106// IsHealthy returns true if all services are currently in the Running state.
107func (m *Manager) IsHealthy() bool {
108 m.mu.Lock()
109 defer m.mu.Unlock()
110
111 return m.state == healthy
112}
113
114// AwaitHealthy waits for the ServiceManager to become healthy. Returns nil, if manager is healthy, error otherwise (eg. manager
115// is in a state in which it cannot get healthy anymore).

Callers 1

Calls

no outgoing calls

Tested by 1