Documentation ¶
Overview ¶
Package ecu implements the Seesaw v2 ECU component, which provides an externally accessible interface to monitor and control the Seesaw Node.
Index ¶
- type Authenticator
- type Config
- type DefaultAuthenticator
- type ECU
- type Publisher
- type SeesawECU
- func (s *SeesawECU) BGPNeighbors(ctx *ipc.Context, reply *quagga.Neighbors) error
- func (s *SeesawECU) Backends(ctx *ipc.Context, reply *int) error
- func (s *SeesawECU) ClusterStatus(ctx *ipc.Context, reply *seesaw.ClusterStatus) error
- func (s *SeesawECU) ConfigReload(ctx *ipc.Context, reply *int) error
- func (s *SeesawECU) ConfigSource(args *ipc.ConfigSource, oldSource *string) error
- func (s *SeesawECU) ConfigStatus(ctx *ipc.Context, reply *seesaw.ConfigStatus) error
- func (s *SeesawECU) Failover(ctx *ipc.Context, reply *int) error
- func (s *SeesawECU) HAStatus(ctx *ipc.Context, status *seesaw.HAStatus) error
- func (s *SeesawECU) OverrideBackend(args *ipc.Override, reply *int) error
- func (s *SeesawECU) OverrideDestination(args *ipc.Override, reply *int) error
- func (s *SeesawECU) OverrideVserver(args *ipc.Override, reply *int) error
- func (s *SeesawECU) VLANs(ctx *ipc.Context, reply *seesaw.VLANs) error
- func (s *SeesawECU) Vservers(ctx *ipc.Context, reply *seesaw.VserverMap) error
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { // AuthInit will be called once when the ECU is run to set up required // resources for authentication. If nothing is needed, it should simply // return nil. If an error is returned, a warning will be // logged but the ECU will continue to run, so implementations should ensure // Authenticate does not crash if AuthInit fails. AuthInit() error // Authenticate inspects the provided context (particularly ctx.AuthToken) // and either returns an error or creates a child context treated as // authenticated (ctx.AuthType == ipc.ATSSO) and fields needed for // authorization checks (ctx.User). Authenticate(ctx *ipc.Context) (*ipc.Context, error) }
Authenticator types provide functionality for authenticating users and adding the authenticated information to a context.
type Config ¶
type Config struct { Authenticator Authenticator CACertsFile string ControlAddress string ECUCertFile string ECUKeyFile string EngineSocket string MonitorAddress string StatsPublishers []Publisher UpdateInterval time.Duration }
Config provides configuration details for a Seesaw ECU.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default ECU configuration.
type DefaultAuthenticator ¶
type DefaultAuthenticator struct{}
DefaultAuthenticator implements a "default-deny authenticator" that denies all authentications. Using this prevents remote connections to the ECU.
func (DefaultAuthenticator) AuthInit ¶
func (DefaultAuthenticator) AuthInit() error
AuthInit does nothing and returns nil.
func (DefaultAuthenticator) Authenticate ¶
Authenticate returns a "default deny" error.
type ECU ¶
type ECU struct {
// contains filtered or unexported fields
}
ECU contains the data necessary to run the Seesaw v2 ECU.
type Publisher ¶
type Publisher interface {
Update(s *Stats)
}
Publisher is an interface for a statistics publisher. Publishers are notified of updates to the statistics with the Update method.
type SeesawECU ¶
type SeesawECU struct {
// contains filtered or unexported fields
}
SeesawECU provides the RPC interface to the Seesaw ECU.
func (*SeesawECU) BGPNeighbors ¶
BGPNeighbors returns a list of the BGP neighbors that we are peering with.
func (*SeesawECU) ClusterStatus ¶
ClusterStatus returns status information about this Seesaw Cluster.
func (*SeesawECU) ConfigReload ¶
ConfigReload requests a configuration reload.
func (*SeesawECU) ConfigSource ¶
func (s *SeesawECU) 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 (*SeesawECU) ConfigStatus ¶
ConfigStatus returns status information about this Seesaw's current configuration.
func (*SeesawECU) OverrideBackend ¶
OverrideBackend requests that the specified BackendOverride be applied.
func (*SeesawECU) OverrideDestination ¶
OverrideDestination requests that the specified DestinationOverride be applied.
func (*SeesawECU) OverrideVserver ¶
OverrideVserver requests that the specified VserverOverride be applied.
type Stats ¶
type Stats struct { LastUpdate time.Time LastSuccess time.Time ClusterStatus seesaw.ClusterStatus ConfigStatus seesaw.ConfigStatus HAStatus seesaw.HAStatus Neighbors []*quagga.Neighbor VLANs []*seesaw.VLAN Vservers map[string]*seesaw.Vserver }
Stats contains the statistics collected from the Seesaw Engine.