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

Method state

ha/core.go:124–128  ·  view source on GitHub ↗

state returns the current HA state for this node.

()

Source from the content-addressed store, hash-verified

122
123// state returns the current HA state for this node.
124func (n *Node) state() spb.HaState {
125 n.statusLock.RLock()
126 defer n.statusLock.RUnlock()
127 return n.haStatus.State
128}
129
130// setState changes the HA state for this node.
131func (n *Node) setState(s spb.HaState) {

Callers 11

RunMethod · 0.95
runOnceMethod · 0.95
becomeShutdownMethod · 0.95
reportStatusMethod · 0.95
TestNoPeerFunction · 0.45
TestHighPriorityPeerFunction · 0.45
TestLowPriorityPeerFunction · 0.45
TestWrongVRRPVersionFunction · 0.45
TestWrongVRIDFunction · 0.45
TestPreemptFunction · 0.45
TestShutdownFunction · 0.45

Calls

no outgoing calls

Tested by 7

TestNoPeerFunction · 0.36
TestHighPriorityPeerFunction · 0.36
TestLowPriorityPeerFunction · 0.36
TestWrongVRRPVersionFunction · 0.36
TestWrongVRIDFunction · 0.36
TestPreemptFunction · 0.36
TestShutdownFunction · 0.36