conn

package
v0.0.0-...-df04a74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package conn provides connectivity and communication with the Seesaw Engine, either over IPC or RPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEngineConn

func RegisterEngineConn(connType string, connFunc func(ctx *ipc.Context) EngineConn)

RegisterEngineConn registers the given connection type.

Types

type EngineConn

type EngineConn interface {
	Close() error
	Dial(addr string) error

	ClusterStatus() (*seesaw.ClusterStatus, error)
	ConfigStatus() (*seesaw.ConfigStatus, error)
	HAStatus() (*seesaw.HAStatus, error)

	ConfigSource(source string) (string, error)
	ConfigReload() error

	BGPNeighbors() ([]*quagga.Neighbor, error)

	VLANs() (*seesaw.VLANs, error)

	Vservers() (map[string]*seesaw.Vserver, error)
	Backends() (map[string]*seesaw.Backend, error)

	OverrideBackend(override *seesaw.BackendOverride) error
	OverrideDestination(override *seesaw.DestinationOverride) error
	OverrideVserver(override *seesaw.VserverOverride) error

	Failover() error
}

EngineConn defines an interface that implements communication with the Seesaw Engine, either over IPC or RPC.

type Seesaw

type Seesaw struct {
	EngineConn
}

Seesaw represents a connection to a Seesaw Engine.

func NewSeesawIPC

func NewSeesawIPC(ctx *ipc.Context) (*Seesaw, error)

NewSeesawIPC returns a new Seesaw IPC connection.

func NewSeesawRPC

func NewSeesawRPC(ctx *ipc.Context) (*Seesaw, error)

NewSeesawRPC returns a new Seesaw RPC connection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL