Documentation ¶
Index ¶
- Variables
- func ChangeInterfaceName(old, newName string) error
- func CreateVethPair(name1, name2 string) error
- func InterfaceDown(name string) error
- func InterfaceUp(name string) error
- func SetDefaultGateway(ip string) error
- func SetInterfaceInNamespacePid(name string, nsPid int) error
- func SetInterfaceIp(name string, rawIp string) error
- func SetInterfaceMaster(name, master string) error
- func SetMtu(name string, mtu int) error
- type Loopback
- type NetworkStrategy
- type Veth
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotValidStrategyType = errors.New("not a valid network strategy type")
)
Functions ¶
func ChangeInterfaceName ¶
func CreateVethPair ¶
func InterfaceDown ¶
func InterfaceUp ¶
func SetDefaultGateway ¶
func SetInterfaceIp ¶
func SetInterfaceMaster ¶
Types ¶
type Loopback ¶ added in v0.9.1
type Loopback struct { }
Loopback is a network strategy that provides a basic loopback device
func (*Loopback) Create ¶ added in v0.9.1
func (l *Loopback) Create(n *libcontainer.Network, nspid int, context libcontainer.Context) error
func (*Loopback) Initialize ¶ added in v0.9.1
func (l *Loopback) Initialize(config *libcontainer.Network, context libcontainer.Context) error
type NetworkStrategy ¶
type NetworkStrategy interface { Create(*libcontainer.Network, int, libcontainer.Context) error Initialize(*libcontainer.Network, libcontainer.Context) error }
NetworkStrategy represents a specific network configuration for a container's networking stack
func GetStrategy ¶
func GetStrategy(tpe string) (NetworkStrategy, error)
GetStrategy returns the specific network strategy for the provided type. If no strategy is registered for the type an ErrNotValidStrategyType is returned.
type Veth ¶
type Veth struct { }
Veth is a network strategy that uses a bridge and creates a veth pair, one that stays outside on the host and the other is placed inside the container's namespace
func (*Veth) Create ¶
func (v *Veth) Create(n *libcontainer.Network, nspid int, context libcontainer.Context) error
func (*Veth) Initialize ¶
func (v *Veth) Initialize(config *libcontainer.Network, context libcontainer.Context) error
Click to show internal directories.
Click to hide internal directories.