bridge

package
v25.0.0-beta.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 28 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"

	// 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 IsV6Listenable

func IsV6Listenable() bool

IsV6Listenable returns true when `[::1]:0` is listenable. IsV6Listenable returns false mostly when the kernel was booted with `ipv6.disable=1` option.

func Register

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

Register registers a new instance of bridge driver.

Types

type ActiveEndpointsError

type ActiveEndpointsError string

ActiveEndpointsError is returned when there are still active endpoints in the network being deleted.

func (ActiveEndpointsError) Error

func (aee ActiveEndpointsError) Error() string

func (ActiveEndpointsError) Forbidden

func (aee ActiveEndpointsError) Forbidden()

Forbidden denotes the type of this error

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 ErrInvalidContainerSubnet

type ErrInvalidContainerSubnet struct{}

ErrInvalidContainerSubnet is returned when the container subnet (FixedCIDR) is not valid.

func (*ErrInvalidContainerSubnet) Error

func (eis *ErrInvalidContainerSubnet) Error() string

func (*ErrInvalidContainerSubnet) InvalidParameter

func (eis *ErrInvalidContainerSubnet) InvalidParameter()

InvalidParameter 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 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 FixedCIDRv4Error

type FixedCIDRv4Error struct {
	Net    *net.IPNet
	Subnet *net.IPNet
	Err    error
}

FixedCIDRv4Error is returned when fixed-cidrv4 configuration failed.

func (*FixedCIDRv4Error) Error

func (fcv4 *FixedCIDRv4Error) Error() string

func (*FixedCIDRv4Error) InternalError

func (fcv4 *FixedCIDRv4Error) InternalError()

InternalError denotes the type of this error

type FixedCIDRv6Error

type FixedCIDRv6Error struct {
	Net *net.IPNet
	Err error
}

FixedCIDRv6Error is returned when fixed-cidrv6 configuration failed.

func (*FixedCIDRv6Error) Error

func (fcv6 *FixedCIDRv6Error) Error() string

func (*FixedCIDRv6Error) InternalError

func (fcv6 *FixedCIDRv6Error) InternalError()

InternalError 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 IPv6AddrAddError

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

IPv6AddrAddError is returned when IPv6 address could not be added to the bridge.

func (*IPv6AddrAddError) Error

func (ipv6 *IPv6AddrAddError) Error() string

func (*IPv6AddrAddError) InternalError

func (ipv6 *IPv6AddrAddError) InternalError()

InternalError denotes the type of this error

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