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)
| 190 | // HealthState advises the Seesaw Engine of state transitions for a set of |
| 191 | // healthchecks that are being performed by the Seesaw Healthcheck component. |
| 192 | func (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. |
| 216 | func (s *SeesawEngine) ClusterStatus(ctx *ipc.Context, reply *seesaw.ClusterStatus) error { |
nothing calls this directly
no test coverage detected