Documentation
¶
Index ¶
- type AddToBridgeError
- type BridgeDetectionError
- type ConfigureDefaultGWError
- type ConfigureLinkError
- type Configurer
- type ContainerConfig
- type DeleteLinkError
- type Filter
- type FindLinkError
- type HostConfig
- type Hostname
- type LinkUpError
- type MTUError
- type Network
- func (n *Network) CIDRSuffix() int
- func (n Network) ContainerIP() net.IP
- func (n Network) HostIP() net.IP
- func (n Network) IP() net.IP
- func (n Network) IPNet() *net.IPNet
- func (n Network) MarshalJSON() ([]byte, error)
- func (n Network) String() string
- func (n *Network) UnmarshalJSON(data []byte) error
- type NetworkConfigurer
- type SetNsFailedError
- type VethPairCreationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddToBridgeError ¶
AddToBridgeError is returned if an error occurs while adding an interface to a bridge
func (AddToBridgeError) Error ¶
func (err AddToBridgeError) Error() string
type BridgeDetectionError ¶
BridgeDetectionError is returned if an error occurs while creating a bridge
func (BridgeDetectionError) Error ¶
func (err BridgeDetectionError) Error() string
type ConfigureDefaultGWError ¶
ConfigureDefaultGWError is returned if the default gateway cannot be updated
func (ConfigureDefaultGWError) Error ¶
func (err ConfigureDefaultGWError) Error() string
type ConfigureLinkError ¶
type ConfigureLinkError struct {
Cause error
Role string
Interface *net.Interface
IntendedIP net.IP
IntendedSubnet *net.IPNet
}
ConfigureLinkError is returned if configuring a link fails
func (ConfigureLinkError) Error ¶
func (err ConfigureLinkError) Error() string
type Configurer ¶
type Configurer interface {
ConfigureContainer(*ContainerConfig) error
ConfigureHost(*HostConfig) error
}
func NewConfigurer ¶
func NewConfigurer(log lager.Logger) Configurer
type ContainerConfig ¶
type DeleteLinkError ¶
DeleteLinkError is returned if an interface cannot be succesfully destroyed
func (DeleteLinkError) Error ¶
func (err DeleteLinkError) Error() string
type Filter ¶
type Filter interface {
Setup(logPrefix string) error
TearDown()
NetOut(garden.NetOutRule) error
}
type FindLinkError ¶
type FindLinkError struct {
Cause error // may be nil if no error occurred other than the link not existing
Role string
Name string
}
FindLinkError is returned if an expected interface cannot be found inside the container
func (FindLinkError) Error ¶
func (err FindLinkError) Error() string
type HostConfig ¶
type LinkUpError ¶
LinkUpError is returned if brinding an interface up fails
func (LinkUpError) Error ¶
func (err LinkUpError) Error() string
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func (*Network) CIDRSuffix ¶
func (Network) ContainerIP ¶
func (Network) MarshalJSON ¶
func (*Network) UnmarshalJSON ¶
type NetworkConfigurer ¶
type NetworkConfigurer struct {
Hostname Hostname
Veth interface {
Create(hostIfcName, containerIfcName string) (*net.Interface, *net.Interface, error)
}
Link interface {
AddIP(intf *net.Interface, ip net.IP, subnet *net.IPNet) error
AddDefaultGW(intf *net.Interface, ip net.IP) error
SetUp(intf *net.Interface) error
SetMTU(intf *net.Interface, mtu int) error
SetNs(intf *net.Interface, pid int) error
InterfaceByName(name string) (*net.Interface, bool, error)
}
Bridge interface {
Create(bridgeName string, ip net.IP, subnet *net.IPNet) (*net.Interface, error)
Add(bridge, slave *net.Interface) error
}
Logger lager.Logger
}
func (*NetworkConfigurer) ConfigureContainer ¶
func (c *NetworkConfigurer) ConfigureContainer(config *ContainerConfig) error
func (*NetworkConfigurer) ConfigureHost ¶
func (c *NetworkConfigurer) ConfigureHost(config *HostConfig) error
type SetNsFailedError ¶
func (SetNsFailedError) Error ¶
func (err SetNsFailedError) Error() string
type VethPairCreationError ¶
VethPairCreationError is returned if creating a virtual ethernet pair fails
func (VethPairCreationError) Error ¶
func (err VethPairCreationError) Error() string
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
fake_bridge_manager
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
|
bridgetest
command
|
|
|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter |
|
fakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
|
The subnets package provides a subnet pool from which networks may be dynamically acquired or statically reserved.
|
The subnets package provides a subnet pool from which networks may be dynamically acquired or statically reserved. |
|
fakes
This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.