MCPcopy
hub / github.com/google/seesaw / Failover

Method Failover

engine/ipc.go:74–85  ·  view source on GitHub ↗

Failover requests the Seesaw Engine to relinquish master state.

(ctx *ipc.Context, reply *int)

Source from the content-addressed store, hash-verified

72
73// Failover requests the Seesaw Engine to relinquish master state.
74func (s *SeesawEngine) Failover(ctx *ipc.Context, reply *int) error {
75 s.trace("Failover", ctx)
76 if ctx == nil {
77 return errContext
78 }
79
80 if !ctx.CanWrite() {
81 return errAccess
82 }
83
84 return s.engine.haManager.requestFailover(false)
85}
86
87// HAConfig returns the high-availability configuration for this node as
88// determined by the engine.

Callers

nothing calls this directly

Calls 3

traceMethod · 0.95
CanWriteMethod · 0.80
requestFailoverMethod · 0.80

Tested by

no test coverage detected