cable

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDriver

func AddDriver(name string, driverCreate DriverCreateFunc)

Adds a supported driver, prints a fatal error in teh case of double registration

func GetDefaultCableDriver

func GetDefaultCableDriver() string

Returns the default cable driver name

func SetDefautCableDriver

func SetDefautCableDriver(driver string)

Sets the default cable driver name, if it is not specified by user.

Types

type Driver

type Driver interface {

	// Init initializes the driver with any state it needs.
	Init() error

	// GetActiveConnections returns an array of all the active connections for the given cluster.
	GetActiveConnections(clusterID string) ([]string, error)

	// ConnectToEndpoint establishes a connection to the given endpoint and returns a string
	// representation of the IP address of the target endpoint.
	ConnectToEndpoint(endpoint types.SubmarinerEndpoint) (string, error)

	// DisconnectFromEndpoint disconnects from the connection to the given endpoint.
	DisconnectFromEndpoint(endpoint types.SubmarinerEndpoint) error
}

Driver is used by the ipsec engine to actually connect the tunnels.

func NewDriver

func NewDriver(localSubnets []string, localEndpoint types.SubmarinerEndpoint) (Driver, error)

Returns a new driver according the required Backend

type DriverCreateFunc

type DriverCreateFunc func(localSubnets []string, localEndpoint types.SubmarinerEndpoint) (Driver, error)

Function prototype to create a new driver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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