Documentation ¶
Overview ¶
Package ha implements high availability (HA) peering between Seesaw nodes using VRRP v3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPConn ¶
IPConn creates a net.IPConn using the given local and remote addresses using IP protocol 112 (VRRP).
func JoinMulticastIPv6 ¶
JoinMulticastIPv6 joins the multicast group address given by gaddr. laddr specifies which network interface to use when joining the group.
Types ¶
type DummyEngine ¶
DummyEngine implements the Engine interface for testing purposes.
func (*DummyEngine) HAConfig ¶
func (e *DummyEngine) HAConfig() (*seesaw.HAConfig, error)
HAConfig returns the HAConfig for a DummyEngine.
type Engine ¶
type Engine interface { HAConfig() (*seesaw.HAConfig, error) HAState(spb.HaState) error HAUpdate(seesaw.HAStatus) (bool, error) }
Engine represents an interface to a Seesaw Engine.
type EngineClient ¶
type EngineClient struct {
Socket string
}
EngineClient implements the Engine interface. It connects to the Seesaw Engine UNIX domain socket specified by Socket.
func (*EngineClient) HAConfig ¶
func (e *EngineClient) HAConfig() (*seesaw.HAConfig, error)
HAConfig requests the HAConfig from the Seesaw Engine.
type HAConn ¶
type HAConn interface {
// contains filtered or unexported methods
}
HAConn represents an HA connection for sending and receiving advertisements between two Nodes.
type IPHAConn ¶
type IPHAConn struct {
// contains filtered or unexported fields
}
IPHAConn implements the HAConn interface.
type Node ¶
type Node struct { NodeConfig // contains filtered or unexported fields }
Node represents one member of a high availability cluster.
func NewNode ¶
func NewNode(cfg NodeConfig, conn HAConn, engine Engine, socket string) *Node
NewNode creates a new Node with the given NodeConfig and HAConn.
type NodeConfig ¶
type NodeConfig struct { seesaw.HAConfig ConfigCheckInterval time.Duration ConfigCheckMaxFailures int ConfigCheckRetryDelay time.Duration MasterAdvertInterval time.Duration Preempt bool StatusReportInterval time.Duration StatusReportMaxFailures int StatusReportRetryDelay time.Duration }
NodeConfig specifies the configuration for a Node.