Documentation ¶
Index ¶
Constants ¶
View Source
const ( ACTIVATED = "ACTIVATED" STANDBY = "STANDBY" FAILING = "FAILING" BOOTING = "BOOTING" )
View Source
const ( FaultEvent = "fault" ElectedEvent = "elected" DemotedEvent = "demoted" HealthCheckFailEvent = "health_check_fail" HealthCheckSuccessEvent = "health_check_success" )
Variables ¶
View Source
var ( // ErrIsNotMaster is an error sent by Failover when the node is not currently master ErrIsNotMaster = errors.New("this node is not master of this IP") // ErrNoOtherHosts is an error sent by Failover when there is no other node to fail over. ErrNoOtherHosts = errors.New("no other nodes are listening for this IP") // ErrReallocationTimedOut is an error returned by waitForReallocation if the reallocation did not happen in less than KeepAliveInterval ErrReallocationTimedOut = errors.New("reallocation timed out") )
Functions ¶
func NewManager ¶
func NewStateMachine ¶
func NewStateMachine(ctx context.Context, opts NewStateMachineOpts) *fsm.FSM
Types ¶
Click to show internal directories.
Click to hide internal directories.