package network
import "github.com/dotcloud/docker/pkg/libcontainer/network"
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
- func (l *Loopback) Create(n *libcontainer.Network, nspid int, context libcontainer.Context) error
- func (l *Loopback) Initialize(config *libcontainer.Network, context libcontainer.Context) error
- type NetNS
- func (v *NetNS) Create(n *libcontainer.Network, nspid int, context libcontainer.Context) error
- func (v *NetNS) Initialize(config *libcontainer.Network, context libcontainer.Context) error
- type NetworkStrategy
- type Veth
Variables ¶
Functions ¶
func ChangeInterfaceName ¶
func CreateVethPair ¶
func InterfaceDown ¶
func InterfaceUp ¶
func SetDefaultGateway ¶
func SetInterfaceInNamespacePid ¶
func SetInterfaceIp ¶
func SetInterfaceMaster ¶
func SetMtu ¶
Types ¶
type Loopback ¶
type Loopback struct { }
Loopback is a network strategy that provides a basic loopback device
func (*Loopback) Create ¶
func (l *Loopback) Create(n *libcontainer.Network, nspid int, context libcontainer.Context) error
func (*Loopback) Initialize ¶
func (l *Loopback) Initialize(config *libcontainer.Network, context libcontainer.Context) error
type NetNS ¶
type NetNS struct { }
crosbymichael: could make a network strategy that instead of returning veth pair names it returns a pid to an existing network namespace
func (*NetNS) Create ¶
func (v *NetNS) Create(n *libcontainer.Network, nspid int, context libcontainer.Context) error
func (*NetNS) Initialize ¶
func (v *NetNS) 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
Source Files ¶
loopback.go netns.go network.go strategy.go veth.go
- Version
- v0.11.1
- Published
- May 8, 2014
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 7 seconds ago –
Tools for package owners.