Documentation ¶
Index ¶
- Constants
- func ConnectToNetwork(nwName string, containerInfo *container.ContainerInfo) error
- func CreateNetwork(driver, subnet, nwName string) error
- func DeleteNetwork(nwName string) error
- func DisconnectFromNetwork(nwName string, containerInfo *container.ContainerInfo) error
- func Init() error
- func ListNetwork() error
- type BridgeNetworkDriver
- func (b *BridgeNetworkDriver) ConnectToNetwork(nw *Network, endpoint *Endpoint) error
- func (b *BridgeNetworkDriver) CreateNetwork(nwName, subnet string, gatewayIp net.IP) (*Network, error)
- func (b *BridgeNetworkDriver) DeleteNetwork(nw *Network) error
- func (b *BridgeNetworkDriver) DisconnectFromNetwork(nw *Network, endpoint *Endpoint) error
- func (b *BridgeNetworkDriver) Name() string
- type Endpoint
- type IpAddrManager
- type Network
- type NetworkDriver
Constants ¶
View Source
const (
DEFAULT_IP_ADDR_MANAGER_ALLOCATOR_PATH = "/var/run/dicker/network/ipam/subnet.json"
)
View Source
const (
DEFAULT_NETWORK_PATH = "/var/run/dicker/network/network"
)
Variables ¶
This section is empty.
Functions ¶
func ConnectToNetwork ¶
func ConnectToNetwork(nwName string, containerInfo *container.ContainerInfo) error
func CreateNetwork ¶
Create a new network in the subnet with the driver.
func DeleteNetwork ¶
func DisconnectFromNetwork ¶
func DisconnectFromNetwork(nwName string, containerInfo *container.ContainerInfo) error
func ListNetwork ¶
func ListNetwork() error
Types ¶
type BridgeNetworkDriver ¶
type BridgeNetworkDriver struct { }
func (*BridgeNetworkDriver) ConnectToNetwork ¶
func (b *BridgeNetworkDriver) ConnectToNetwork(nw *Network, endpoint *Endpoint) error
Connect the endpoint to the network.
func (*BridgeNetworkDriver) CreateNetwork ¶
func (*BridgeNetworkDriver) DeleteNetwork ¶
func (b *BridgeNetworkDriver) DeleteNetwork(nw *Network) error
func (*BridgeNetworkDriver) DisconnectFromNetwork ¶
func (b *BridgeNetworkDriver) DisconnectFromNetwork(nw *Network, endpoint *Endpoint) error
Disconnect the endpoint from the network.
func (*BridgeNetworkDriver) Name ¶
func (b *BridgeNetworkDriver) Name() string
type IpAddrManager ¶
type Network ¶
type NetworkDriver ¶
type NetworkDriver interface { Name() string CreateNetwork(nwName, subnet string, gatewayIp net.IP) (*Network, error) // Only use network name as the parameter should still work? DeleteNetwork(nw *Network) error ConnectToNetwork(nw *Network, endpoint *Endpoint) error DisconnectFromNetwork(nw *Network, endpoint *Endpoint) error }
Click to show internal directories.
Click to hide internal directories.