Documentation
¶
Index ¶
- Constants
- Variables
- func New() (string, driverapi.Driver)
- type ActiveEndpointsError
- type Configuration
- type ContainerConfiguration
- type EndpointConfiguration
- type EndpointNotFoundError
- type ErrInvalidAddressBinding
- type ErrInvalidPort
- type ErrUnsupportedAddressType
- type FixedCIDRv4Error
- type FixedCIDRv6Error
- type IPv4AddrAddError
- type IPv4AddrNoMatchError
- type IPv4AddrRangeError
- type IPv6AddrAddError
- type IPv6AddrNoMatchError
- type InvalidEndpointIDError
- type InvalidLinkIPAddrError
- type InvalidNetworkIDError
- type InvalidSandboxIDError
- type NonDefaultBridgeExistError
Constants ¶
const ( // DefaultBridgeName is the default name for the bridge interface managed // by the driver when unspecified by the caller. DefaultBridgeName = "docker0" )
const (
DockerChain = "DOCKER"
)
DockerChain: DOCKER iptable chain name
Variables ¶
var ( // ErrConfigExists error is returned when driver already has a config applied. ErrConfigExists = errors.New("configuration already exists, bridge configuration can be applied only once") // ErrInvalidDriverConfig error is returned when Bridge Driver is passed an invalid config ErrInvalidDriverConfig = errors.New("Invalid configuration passed to Bridge Driver") // ErrInvalidNetworkConfig error is returned when a network is created on a driver without valid config. ErrInvalidNetworkConfig = errors.New("trying to create a network on a driver without valid config") // ErrInvalidContainerConfig error is returned when a endpoint create is attempted with an invalid configuration. ErrInvalidContainerConfig = errors.New("Error in joining a container due to invalid configuration") // ErrInvalidEndpointConfig error is returned when a endpoint create is attempted with an invalid endpoint configuration. ErrInvalidEndpointConfig = errors.New("trying to create an endpoint with an invalid endpoint configuration") // ErrNetworkExists error is returned when a network already exists and another network is created. ErrNetworkExists = errors.New("network already exists, bridge can only have one network") // ErrIfaceName error is returned when a new name could not be generated. ErrIfaceName = errors.New("failed to find name for new interface") // ErrNoIPAddr error is returned when bridge has no IPv4 address configured. ErrNoIPAddr = errors.New("bridge has no IPv4 address configured") // ErrInvalidGateway is returned when the user provided default gateway (v4/v6) is not not valid. ErrInvalidGateway = errors.New("default gateway ip must be part of the network") // ErrInvalidContainerSubnet is returned when the container subnet (FixedCIDR) is not valid. ErrInvalidContainerSubnet = errors.New("container subnet must be a subset of bridge network") // ErrInvalidMtu is returned when the user provided MTU is not valid. ErrInvalidMtu = errors.New("invalid MTU number") )
Functions ¶
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
type Configuration ¶
type Configuration struct {
BridgeName string
AddressIPv4 *net.IPNet
FixedCIDR *net.IPNet
FixedCIDRv6 *net.IPNet
EnableIPv6 bool
EnableIPTables bool
EnableIPMasquerade bool
EnableICC bool
EnableIPForwarding bool
AllowNonDefaultBridge bool
Mtu int
DefaultGatewayIPv4 net.IP
DefaultGatewayIPv6 net.IP
DefaultBindingIP net.IP
}
Configuration info for the "bridge" driver.
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
Validate performs a static validation on the configuration parameters. Whatever can be assessed a priori before attempting any programming.
type ContainerConfiguration ¶
ContainerConfiguration represents the user specified configuration for a container
type EndpointConfiguration ¶
type EndpointConfiguration struct {
MacAddress net.HardwareAddr
PortBindings []netutils.PortBinding
ExposedPorts []netutils.TransportPort
}
EndpointConfiguration represents the user specified configuration for the sandbox endpoint
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
type ErrInvalidAddressBinding ¶
type ErrInvalidAddressBinding string
ErrInvalidAddressBinding is returned when the host address specfied in the port binding is not valid.
func (ErrInvalidAddressBinding) Error ¶
func (iab ErrInvalidAddressBinding) Error() string
type ErrInvalidPort ¶
type ErrInvalidPort string
ErrInvalidPort is returned when the container or host port specified in the port binding is not valid.
func (ErrInvalidPort) Error ¶
func (ip ErrInvalidPort) Error() string
type ErrUnsupportedAddressType ¶
type ErrUnsupportedAddressType string
ErrUnsupportedAddressType is returned when the specified address type is not supported.
func (ErrUnsupportedAddressType) Error ¶
func (uat ErrUnsupportedAddressType) Error() string
type FixedCIDRv4Error ¶
type FixedCIDRv4Error struct {
// contains filtered or unexported fields
}
FixedCIDRv4Error is returned when fixed-cidrv4 configuration failed.
func (*FixedCIDRv4Error) Error ¶
func (fcv4 *FixedCIDRv4Error) Error() string
type FixedCIDRv6Error ¶
type FixedCIDRv6Error struct {
// contains filtered or unexported fields
}
FixedCIDRv6Error is returned when fixed-cidrv6 configuration failed.
func (*FixedCIDRv6Error) Error ¶
func (fcv6 *FixedCIDRv6Error) Error() string
type IPv4AddrAddError ¶
type IPv4AddrAddError struct {
// contains filtered or unexported fields
}
IPv4AddrAddError is returned when IPv4 address could not be added to the bridge.
func (*IPv4AddrAddError) Error ¶
func (ipv4 *IPv4AddrAddError) Error() string
type IPv4AddrNoMatchError ¶
type IPv4AddrNoMatchError struct {
// contains filtered or unexported fields
}
IPv4AddrNoMatchError is returned when the bridge's IPv4 address does not match configured.
func (*IPv4AddrNoMatchError) Error ¶
func (ipv4 *IPv4AddrNoMatchError) Error() string
type IPv4AddrRangeError ¶
type IPv4AddrRangeError string
IPv4AddrRangeError is returned when a valid IP address range couldn't be found.
func (IPv4AddrRangeError) Error ¶
func (name IPv4AddrRangeError) Error() string
type IPv6AddrAddError ¶
type IPv6AddrAddError struct {
// contains filtered or unexported fields
}
IPv6AddrAddError is returned when IPv6 address could not be added to the bridge.
func (*IPv6AddrAddError) Error ¶
func (ipv6 *IPv6AddrAddError) 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
type InvalidLinkIPAddrError ¶
type InvalidLinkIPAddrError string
InvalidLinkIPAddrError is returned when a link is configured to a container with an invalid ip address
func (InvalidLinkIPAddrError) Error ¶
func (address InvalidLinkIPAddrError) Error() string
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
type InvalidSandboxIDError ¶
type InvalidSandboxIDError string
InvalidSandboxIDError is returned when the passed sandbox id valid.
func (InvalidSandboxIDError) Error ¶
func (isie InvalidSandboxIDError) Error() string
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