Documentation ¶
Overview ¶
Package engine implements the Seesaw v2 engine component, which is responsible for maintaining configuration information, handling state transitions and providing communication between Seesaw v2 components.
Index ¶
- type Engine
- type SeesawEngine
- func (s *SeesawEngine) BGPNeighbors(ctx *ipc.Context, reply *quagga.Neighbors) error
- func (s *SeesawEngine) Backends(ctx *ipc.Context, reply *int) error
- func (s *SeesawEngine) ClusterStatus(ctx *ipc.Context, reply *seesaw.ClusterStatus) error
- func (s *SeesawEngine) ConfigReload(ctx *ipc.Context, reply *int) error
- func (s *SeesawEngine) ConfigSource(args *ipc.ConfigSource, oldSource *string) error
- func (s *SeesawEngine) ConfigStatus(ctx *ipc.Context, reply *seesaw.ConfigStatus) error
- func (s *SeesawEngine) Failover(ctx *ipc.Context, reply *int) error
- func (s *SeesawEngine) HAConfig(ctx *ipc.Context, reply *seesaw.HAConfig) error
- func (s *SeesawEngine) HAState(args *ipc.HAState, reply *int) error
- func (s *SeesawEngine) HAStatus(ctx *ipc.Context, status *seesaw.HAStatus) error
- func (s *SeesawEngine) HAUpdate(args *ipc.HAStatus, failover *bool) error
- func (s *SeesawEngine) HealthState(args *healthcheck.HealthState, reply *int) error
- func (s *SeesawEngine) Healthchecks(ctx *ipc.Context, reply *healthcheck.Checks) error
- func (s *SeesawEngine) OverrideBackend(args *ipc.Override, reply *int) error
- func (s *SeesawEngine) OverrideDestination(args *ipc.Override, reply *int) error
- func (s *SeesawEngine) OverrideVserver(args *ipc.Override, reply *int) error
- func (s *SeesawEngine) VLANs(ctx *ipc.Context, reply *seesaw.VLANs) error
- func (s *SeesawEngine) Vservers(ctx *ipc.Context, reply *seesaw.VserverMap) error
- type SeesawSync
- func (s *SeesawSync) Config(arg int, config *config.Notification) error
- func (s *SeesawSync) Deregister(id SyncSessionID, reply *int) error
- func (s *SeesawSync) Failover(arg int, reply *int) error
- func (s *SeesawSync) Healthchecks(arg int, reply *int) error
- func (s *SeesawSync) Poll(id SyncSessionID, sn *SyncNotes) error
- func (s *SeesawSync) Register(node net.IP, id *SyncSessionID) error
- type SyncNote
- type SyncNoteType
- type SyncNotes
- type SyncSessionID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine contains the data necessary to run the Seesaw v2 Engine.
func NewEngine ¶
func NewEngine(cfg *config.EngineConfig) *Engine
NewEngine returns an initialised Engine struct.
type SeesawEngine ¶
type SeesawEngine struct {
// contains filtered or unexported fields
}
SeesawEngine provides the IPC interface to the Seesaw Engine.
func (*SeesawEngine) BGPNeighbors ¶
BGPNeighbors returns a list of the BGP neighbors that we are peering with.
func (*SeesawEngine) Backends ¶
func (s *SeesawEngine) Backends(ctx *ipc.Context, reply *int) error
Backends returns a list of currently configured Backends.
func (*SeesawEngine) ClusterStatus ¶
func (s *SeesawEngine) ClusterStatus(ctx *ipc.Context, reply *seesaw.ClusterStatus) error
ClusterStatus returns status information about this Seesaw Cluster.
func (*SeesawEngine) ConfigReload ¶
func (s *SeesawEngine) ConfigReload(ctx *ipc.Context, reply *int) error
ConfigReload requests a configuration reload.
func (*SeesawEngine) ConfigSource ¶
func (s *SeesawEngine) ConfigSource(args *ipc.ConfigSource, oldSource *string) error
ConfigSource requests the configuration source be changed to the specified source. The name of the original source is returned.
func (*SeesawEngine) ConfigStatus ¶
func (s *SeesawEngine) ConfigStatus(ctx *ipc.Context, reply *seesaw.ConfigStatus) error
ConfigStatus returns status information about this Seesaw's current configuration.
func (*SeesawEngine) Failover ¶
func (s *SeesawEngine) Failover(ctx *ipc.Context, reply *int) error
Failover requests the Seesaw Engine to relinquish master state.
func (*SeesawEngine) HAConfig ¶
HAConfig returns the high-availability configuration for this node as determined by the engine.
func (*SeesawEngine) HAState ¶
func (s *SeesawEngine) HAState(args *ipc.HAState, reply *int) error
HAState advises the Engine of the current high-availability state as determined by the Seesaw HA component.
func (*SeesawEngine) HAUpdate ¶
func (s *SeesawEngine) HAUpdate(args *ipc.HAStatus, failover *bool) error
HAUpdate advises the Engine of the current high-availability status for the Seesaw HA component. The Seesaw Engine may also request a failover in response.
func (*SeesawEngine) HealthState ¶
func (s *SeesawEngine) HealthState(args *healthcheck.HealthState, reply *int) error
HealthState advises the Seesaw Engine of state transitions for a set of healthchecks that are being performed by the Seesaw Healthcheck component.
func (*SeesawEngine) Healthchecks ¶
func (s *SeesawEngine) Healthchecks(ctx *ipc.Context, reply *healthcheck.Checks) error
Healthchecks returns a list of currently configured healthchecks that should be performed by the Seesaw Healthcheck component.
func (*SeesawEngine) OverrideBackend ¶
func (s *SeesawEngine) OverrideBackend(args *ipc.Override, reply *int) error
OverrideBackend passes a BackendOverride to the engine.
func (*SeesawEngine) OverrideDestination ¶
func (s *SeesawEngine) OverrideDestination(args *ipc.Override, reply *int) error
OverrideDestination passes a DestinationOverride to the engine.
func (*SeesawEngine) OverrideVserver ¶
func (s *SeesawEngine) OverrideVserver(args *ipc.Override, reply *int) error
OverrideVserver passes a VserverOverride to the engine.
func (*SeesawEngine) Vservers ¶
func (s *SeesawEngine) Vservers(ctx *ipc.Context, reply *seesaw.VserverMap) error
Vservers returns a list of currently configured vservers.
type SeesawSync ¶
type SeesawSync struct {
// contains filtered or unexported fields
}
SeesawSync provides the synchronisation RPC interface to the Seesaw Engine.
func (*SeesawSync) Config ¶
func (s *SeesawSync) Config(arg int, config *config.Notification) error
Config requests the current configuration from the peer Seesaw node.
func (*SeesawSync) Deregister ¶
func (s *SeesawSync) Deregister(id SyncSessionID, reply *int) error
Deregister deregisters a Seesaw peer for synchronisation.
func (*SeesawSync) Failover ¶
func (s *SeesawSync) Failover(arg int, reply *int) error
Failover requests that we relinquish master state.
func (*SeesawSync) Healthchecks ¶
func (s *SeesawSync) Healthchecks(arg int, reply *int) error
Healthchecks requests the current healthchecks from the peer Seesaw node.
func (*SeesawSync) Poll ¶
func (s *SeesawSync) Poll(id SyncSessionID, sn *SyncNotes) error
Poll returns one or more synchronisation notifications to the caller, blocking until at least one notification becomes available or the poll timeout is reached.
func (*SeesawSync) Register ¶
func (s *SeesawSync) Register(node net.IP, id *SyncSessionID) error
Register registers our Seesaw peer for synchronisation notifications.
type SyncNote ¶
type SyncNote struct { Type SyncNoteType Config *config.Notification Healthcheck *healthcheck.Notification BackendOverride *seesaw.BackendOverride DestinationOverride *seesaw.DestinationOverride VserverOverride *seesaw.VserverOverride }
SyncNote represents a synchronisation notification.
type SyncNoteType ¶
type SyncNoteType int
SyncNoteType specifies the type of a synchronisation notification.
const ( SNTHeartbeat SyncNoteType = iota SNTDesync SNTConfigUpdate SNTHealthcheck SNTOverride )
func (SyncNoteType) String ¶
func (snt SyncNoteType) String() string
String returns the string representation of a synchronisation notification type.
type SyncNotes ¶
type SyncNotes struct {
Notes []SyncNote
}
SyncNotes specifies a collection of SyncNotes.
type SyncSessionID ¶
type SyncSessionID uint64
SyncSessionID specifies a synchronisation session identifier.