MCPcopy Index your code
hub / github.com/google/seesaw / HealthState

Method HealthState

engine/ipc.go:192–213  ·  view source on GitHub ↗

HealthState advises the Seesaw Engine of state transitions for a set of healthchecks that are being performed by the Seesaw Healthcheck component.

(args *healthcheck.HealthState, reply *int)

Source from the content-addressed store, hash-verified

190// HealthState advises the Seesaw Engine of state transitions for a set of
191// healthchecks that are being performed by the Seesaw Healthcheck component.
192func (s *SeesawEngine) HealthState(args *healthcheck.HealthState, reply *int) error {
193 if args == nil {
194 return errors.New("args is nil")
195 }
196 ctx := args.Ctx
197 s.trace("HealthState", ctx)
198 if ctx == nil {
199 return errContext
200 }
201
202 if !ctx.IsTrusted() {
203 return errAccess
204 }
205
206 for _, n := range args.Notifications {
207 if err := s.engine.hcManager.queueHealthState(n); err != nil {
208 return err
209 }
210 }
211
212 return nil
213}
214
215// ClusterStatus returns status information about this Seesaw Cluster.
216func (s *SeesawEngine) ClusterStatus(ctx *ipc.Context, reply *seesaw.ClusterStatus) error {

Callers

nothing calls this directly

Calls 3

traceMethod · 0.95
IsTrustedMethod · 0.80
queueHealthStateMethod · 0.80

Tested by

no test coverage detected