bridge

package
v27.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultGatewayV4AuxKey represents the default-gateway configured by the user
	DefaultGatewayV4AuxKey = "DefaultGatewayIPv4"
	// DefaultGatewayV6AuxKey represents the ipv6 default-gateway configured by the user
	DefaultGatewayV6AuxKey = "DefaultGatewayIPv6"
)
View Source
const (
	// BridgeName label for bridge driver
	BridgeName = "com.docker.network.bridge.name"

	// EnableIPMasquerade label for bridge driver
	EnableIPMasquerade = "com.docker.network.bridge.enable_ip_masquerade"

	// IPv4GatewayMode label for bridge driver
	IPv4GatewayMode = "com.docker.network.bridge.gateway_mode_ipv4"
	// IPv6GatewayMode label for bridge driver
	IPv6GatewayMode = "com.docker.network.bridge.gateway_mode_ipv6"

	// EnableICC label
	EnableICC = "com.docker.network.bridge.enable_icc"

	// InhibitIPv4 label
	InhibitIPv4 = "com.docker.network.bridge.inhibit_ipv4"

	// DefaultBindingIP label
	DefaultBindingIP = "com.docker.network.bridge.host_binding_ipv4"

	// DefaultBridge label
	DefaultBridge = "com.docker.network.bridge.default_bridge"
)
View Source
const (
	DockerChain = "DOCKER"

	IsolationChain1 = "DOCKER-ISOLATION-STAGE-1"
	IsolationChain2 = "DOCKER-ISOLATION-STAGE-2"
)

DockerChain: DOCKER iptable chain name

View Source
const (
	// DefaultBridgeName is the default name for the bridge interface managed
	// by the driver when unspecified by the caller.
	DefaultBridgeName = "docker0"
)
View Source
const (
	NetworkType = "bridge"
)

Variables

This section is empty.

Functions

func Register

func Register(r driverapi.Registerer, config map[string]interface{}) error

Register registers a new instance of bridge driver.

func ValidateFixedCIDRV6

func ValidateFixedCIDRV6(val string) error

ValidateFixedCIDRV6 checks that val is an IPv6 address and prefix length that does not overlap with the link local subnet prefix 'fe80::/64'.

Types

type EndpointNotFoundError

type EndpointNotFoundError string

EndpointNotFoundError is returned when the no endpoint with the passed endpoint id is found.

func (EndpointNotFoundError) Error

func (enfe EndpointNotFoundError) Error() string

func (EndpointNotFoundError) NotFound

func (enfe EndpointNotFoundError) NotFound()

NotFound denotes the type of this error

type ErrConfigExists

type ErrConfigExists struct{}

ErrConfigExists error is returned when driver already has a config applied.

func (*ErrConfigExists) Error

func (ece *ErrConfigExists) Error() string

func (*ErrConfigExists) Forbidden

func (ece *ErrConfigExists) Forbidden()

Forbidden denotes the type of this error

type ErrIfaceName

type ErrIfaceName struct{}

ErrIfaceName error is returned when a new name could not be generated.

func (*ErrIfaceName) Error

func (ein *ErrIfaceName) Error() string

func (*ErrIfaceName) InternalError

func (ein *ErrIfaceName) InternalError()

InternalError denotes the type of this error

type ErrInvalidDriverConfig

type ErrInvalidDriverConfig struct{}

ErrInvalidDriverConfig error is returned when Bridge Driver is passed an invalid config

func (*ErrInvalidDriverConfig) Error

func (eidc *ErrInvalidDriverConfig) Error() string

type ErrInvalidEndpointConfig

type ErrInvalidEndpointConfig struct{}

ErrInvalidEndpointConfig error is returned when an endpoint create is attempted with an invalid endpoint configuration.

func (*ErrInvalidEndpointConfig) Error

func (eiec *ErrInvalidEndpointConfig) Error() string

func (*ErrInvalidEndpointConfig) InvalidParameter

func (eiec *ErrInvalidEndpointConfig) InvalidParameter()

InvalidParameter denotes the type of this error

type ErrInvalidGateway

type ErrInvalidGateway struct{}

ErrInvalidGateway is returned when the user provided default gateway (v4/v6) is not valid.

func (*ErrInvalidGateway) Error

func (eig *ErrInvalidGateway) Error() string

func (*ErrInvalidGateway) InvalidParameter

func (eig *ErrInvalidGateway) InvalidParameter()

InvalidParameter denotes the type of this error

type ErrInvalidMtu

type ErrInvalidMtu int

ErrInvalidMtu is returned when the user provided MTU is not valid.

func (ErrInvalidMtu) Error

func (eim ErrInvalidMtu) Error() string

func (ErrInvalidMtu) InvalidParameter

func (eim ErrInvalidMtu) InvalidParameter()

InvalidParameter denotes the type of this error

type ErrInvalidNetworkConfig

type ErrInvalidNetworkConfig struct{}

ErrInvalidNetworkConfig error is returned when a network is created on a driver without valid config.

func (*ErrInvalidNetworkConfig) Error

func (einc *ErrInvalidNetworkConfig) Error() string

func (*ErrInvalidNetworkConfig) Forbidden

func (einc *ErrInvalidNetworkConfig) Forbidden()

Forbidden denotes the type of this error

type ErrNetworkExists

type ErrNetworkExists struct{}

ErrNetworkExists error is returned when a network already exists and another network is created.

func (*ErrNetworkExists) Error

func (ene *ErrNetworkExists) Error() string

func (*ErrNetworkExists) Forbidden

func (ene *ErrNetworkExists) Forbidden()

Forbidden denotes the type of this error

type ErrNoIPAddr

type ErrNoIPAddr struct{}

ErrNoIPAddr error is returned when bridge has no IPv4 address configured.

func (*ErrNoIPAddr) Error

func (enip *ErrNoIPAddr) Error() string

func (*ErrNoIPAddr) InternalError

func (enip *ErrNoIPAddr) InternalError()

InternalError denotes the type of this error

type ErrUnsupportedAddressType

type ErrUnsupportedAddressType string

ErrUnsupportedAddressType is returned when the specified address type is not supported.

func (ErrUnsupportedAddressType) Error

func (uat ErrUnsupportedAddressType) Error() string

func (ErrUnsupportedAddressType) InvalidParameter

func (uat ErrUnsupportedAddressType) InvalidParameter()

InvalidParameter denotes the type of this error

type IPv4AddrAddError

type IPv4AddrAddError struct {
	IP  *net.IPNet
	Err error
}

IPv4AddrAddError is returned when IPv4 address could not be added to the bridge.

func (*IPv4AddrAddError) Error

func (ipv4 *IPv4AddrAddError) Error() string

func (*IPv4AddrAddError) InternalError

func (ipv4 *IPv4AddrAddError) InternalError()

InternalError denotes the type of this error

type IPv4AddrNoMatchError

type IPv4AddrNoMatchError struct {
	IP    net.IP
	CfgIP net.IP
}

IPv4AddrNoMatchError is returned when the bridge's IPv4 address does not match configured.

func (*IPv4AddrNoMatchError) Error

func (ipv4 *IPv4AddrNoMatchError) Error() string

type IPv6AddrNoMatchError

type IPv6AddrNoMatchError net.IPNet

IPv6AddrNoMatchError is returned when the bridge's IPv6 address does not match configured.

func (*IPv6AddrNoMatchError) Error

func (ipv6 *IPv6AddrNoMatchError) Error() string

type InvalidEndpointIDError

type InvalidEndpointIDError string

InvalidEndpointIDError is returned when the passed endpoint id is not valid.

func (InvalidEndpointIDError) Error

func (ieie InvalidEndpointIDError) Error() string

func (InvalidEndpointIDError) InvalidParameter

func (ieie InvalidEndpointIDError) InvalidParameter()

InvalidParameter denotes the type of this error

type InvalidNetworkIDError

type InvalidNetworkIDError string

InvalidNetworkIDError is returned when the passed network id for an existing network is not a known id.

func (InvalidNetworkIDError) Error

func (inie InvalidNetworkIDError) Error() string

func (InvalidNetworkIDError) NotFound

func (inie InvalidNetworkIDError) NotFound()

NotFound denotes the type of this error

type NonDefaultBridgeExistError

type NonDefaultBridgeExistError string

NonDefaultBridgeExistError is returned when a non-default bridge config is passed but it does not already exist.

func (NonDefaultBridgeExistError) Error

func (ndbee NonDefaultBridgeExistError) Error() string

func (NonDefaultBridgeExistError) Forbidden

func (ndbee NonDefaultBridgeExistError) Forbidden()

Forbidden denotes the type of this error

type NonDefaultBridgeNeedsIPError

type NonDefaultBridgeNeedsIPError string

NonDefaultBridgeNeedsIPError is returned when a non-default bridge config is passed but it has no ip configured

func (NonDefaultBridgeNeedsIPError) Error

func (ndbee NonDefaultBridgeNeedsIPError) Error() string

func (NonDefaultBridgeNeedsIPError) Forbidden

func (ndbee NonDefaultBridgeNeedsIPError) Forbidden()

Forbidden denotes the type of this error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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