Documentation ¶
Index ¶
- Constants
- func IsV6Listenable() bool
- func Register(r driverapi.Registerer, config map[string]interface{}) error
- func ValidateFixedCIDRV6(val string) error
- type ActiveEndpointsError
- type EndpointNotFoundError
- type ErrConfigExists
- type ErrIfaceName
- type ErrInvalidContainerSubnet
- type ErrInvalidDriverConfig
- type ErrInvalidEndpointConfig
- type ErrInvalidGateway
- type ErrInvalidMtu
- type ErrInvalidNetworkConfig
- type ErrNetworkExists
- type ErrNoIPAddr
- type ErrUnsupportedAddressType
- type FixedCIDRv4Error
- type FixedCIDRv6Error
- type IPv4AddrAddError
- type IPv4AddrNoMatchError
- type IPv6AddrNoMatchError
- type InvalidEndpointIDError
- type InvalidNetworkIDError
- type NonDefaultBridgeExistError
- type NonDefaultBridgeNeedsIPError
Constants ¶
const ( // DefaultGatewayV4AuxKey represents the default-gateway configured by the user DefaultGatewayV4AuxKey = "DefaultGatewayIPv4" // DefaultGatewayV6AuxKey represents the ipv6 default-gateway configured by the user DefaultGatewayV6AuxKey = "DefaultGatewayIPv6" )
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" )
const ( DockerChain = "DOCKER" IsolationChain1 = "DOCKER-ISOLATION-STAGE-1" IsolationChain2 = "DOCKER-ISOLATION-STAGE-2" )
DockerChain: DOCKER iptable chain name
const ( // DefaultBridgeName is the default name for the bridge interface managed // by the driver when unspecified by the caller. DefaultBridgeName = "docker0" )
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.
func ValidateFixedCIDRV6 ¶
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 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 ¶
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 ¶
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 ¶
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 ¶
IPv4AddrNoMatchError is returned when the bridge's IPv4 address does not match configured.
func (*IPv4AddrNoMatchError) Error ¶
func (ipv4 *IPv4AddrNoMatchError) Error() string
type IPv6AddrNoMatchError ¶
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