driver

package
v0.0.0-...-789973c Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//LocalAddresses reserved local addresses
	LocalAddresses = []string{
		"0.0.0.0/8",
		"10.0.0.0/8",
		"127.0.0.0/8",
		"169.254.0.0/16",
		"172.16.0.0/12",
		"192.168.0.0/16",
		"224.0.0.0/4",
		"240.0.0.0/4",
	}
)

Functions

This section is empty.

Types

type Callback

type Callback struct {
	// contains filtered or unexported fields
}

Callback a callback implementation used to highjack a libnetwork bridge driver instance

func (*Callback) GetPluginGetter

func (*Callback) GetPluginGetter() plugingetter.PluginGetter

GetPluginGetter not supported

func (*Callback) RegisterDriver

func (d *Callback) RegisterDriver(name string, driver driverapi.Driver, capability driverapi.Capability) error

RegisterDriver saves the libnetwork bridge driver instance

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver A Driver structure

func New

func New() Driver

New Creates a new Driver instance

func (*Driver) AllocateNetwork

func (d *Driver) AllocateNetwork(request *network.AllocateNetworkRequest) (*network.AllocateNetworkResponse, error)

AllocateNetwork driver-utils contract implementation

func (*Driver) CreateEndpoint

func (d *Driver) CreateEndpoint(request *network.CreateEndpointRequest) (*network.CreateEndpointResponse, error)

CreateEndpoint driver-utils contract implementation

func (*Driver) CreateNetwork

func (d *Driver) CreateNetwork(request *network.CreateNetworkRequest) error

CreateNetwork driver-utils contract implementation

func (*Driver) DeleteEndpoint

func (d *Driver) DeleteEndpoint(request *network.DeleteEndpointRequest) error

DeleteEndpoint driver-utils contract implementation

func (*Driver) DeleteNetwork

func (d *Driver) DeleteNetwork(request *network.DeleteNetworkRequest) error

DeleteNetwork driver-utils contract implementation

func (*Driver) DiscoverDelete

func (d *Driver) DiscoverDelete(request *network.DiscoveryNotification) error

DiscoverDelete driver-utils contract implementation

func (*Driver) DiscoverNew

func (d *Driver) DiscoverNew(request *network.DiscoveryNotification) error

DiscoverNew driver-utils contract implementation

func (*Driver) EndpointInfo

func (d *Driver) EndpointInfo(request *network.InfoRequest) (*network.InfoResponse, error)

EndpointInfo driver-utils contract implementation

func (*Driver) FreeNetwork

func (d *Driver) FreeNetwork(request *network.FreeNetworkRequest) error

FreeNetwork driver-utils contract implementation

func (*Driver) GetCapabilities

func (d *Driver) GetCapabilities() (*network.CapabilitiesResponse, error)

GetCapabilities driver-utils contract implementation

func (*Driver) Join

func (d *Driver) Join(request *network.JoinRequest) (*network.JoinResponse, error)

Join driver-utils contract implementation

func (*Driver) Leave

func (d *Driver) Leave(request *network.LeaveRequest) error

Leave driver-utils contract implementation

func (*Driver) ProgramExternalConnectivity

func (d *Driver) ProgramExternalConnectivity(request *network.ProgramExternalConnectivityRequest) error

ProgramExternalConnectivity driver-utils contract implementation

func (*Driver) Recover

func (d *Driver) Recover(networks []docker.Network)

Recover updates in-memory information on driver startup (e.g. if networks using the driver already exist)

func (*Driver) RevokeExternalConnectivity

func (d *Driver) RevokeExternalConnectivity(request *network.RevokeExternalConnectivityRequest) error

RevokeExternalConnectivity driver-utils contract implementation

func (*Driver) ShutDown

func (d *Driver) ShutDown()

ShutDown shutdown hook, used to free resources

type InterfaceInfoProxy

type InterfaceInfoProxy struct {
	// contains filtered or unexported fields
}

InterfaceInfoProxy a libnetwork InfoProxy proxy

func (*InterfaceInfoProxy) Address

func (iface *InterfaceInfoProxy) Address() *net.IPNet

Address returns the network address of the network interface

func (*InterfaceInfoProxy) AddressIPv6

func (iface *InterfaceInfoProxy) AddressIPv6() *net.IPNet

AddressIPv6 returns the network address (v6) of the network interface

func (*InterfaceInfoProxy) MacAddress

func (iface *InterfaceInfoProxy) MacAddress() net.HardwareAddr

MacAddress returns the Mac address of the network interface

func (*InterfaceInfoProxy) SetIPAddress

func (iface *InterfaceInfoProxy) SetIPAddress(ip *net.IPNet) error

SetIPAddress intercepts the SetIPAddress call and updates the response data

func (*InterfaceInfoProxy) SetMacAddress

func (iface *InterfaceInfoProxy) SetMacAddress(mac net.HardwareAddr) error

SetMacAddress intercepts the SetMacAddress call and updates the response data

type InterfaceNameInfoProxy

type InterfaceNameInfoProxy struct {
	InterfaceName *network.InterfaceName
}

InterfaceNameInfoProxy a libnetwork InterfaceNameInfo proxy

func (InterfaceNameInfoProxy) SetNames

func (proxy InterfaceNameInfoProxy) SetNames(srcName, dstPrefix string) error

SetNames intercepts the libnetwork SetNames

type JoinInfoProxy

type JoinInfoProxy struct {
	// contains filtered or unexported fields
}

JoinInfoProxy a libnetwork JoinInfo proxy

func (*JoinInfoProxy) AddStaticRoute

func (p *JoinInfoProxy) AddStaticRoute(destination *net.IPNet, routeType int, nextHop net.IP) error

AddStaticRoute intercepts the libnetwork AddStaticRoute call and updates the driver response

func (*JoinInfoProxy) AddTableEntry

func (p *JoinInfoProxy) AddTableEntry(tableName string, key string, value []byte) error

AddTableEntry unsupported

func (*JoinInfoProxy) DisableGatewayService

func (p *JoinInfoProxy) DisableGatewayService()

DisableGatewayService intercepts the libnetwork DisableGatewayService call and updates the driver response

func (*JoinInfoProxy) InterfaceName

func (p *JoinInfoProxy) InterfaceName() driverapi.InterfaceNameInfo

InterfaceName returns the network interface name

func (*JoinInfoProxy) SetGateway

func (p *JoinInfoProxy) SetGateway(ip net.IP) error

SetGateway intercepts the libnetwork SetGateway call and updates the driver response

func (*JoinInfoProxy) SetGatewayIPv6

func (p *JoinInfoProxy) SetGatewayIPv6(ip net.IP) error

SetGatewayIPv6 intercepts the libnetwork SetGatewayIPv6 call and updates the driver response

Jump to

Keyboard shortcuts

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