Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultContainerInterface is the default container interface. DefaultContainerInterface = "eth0" // DefaultPortPrefix is the default port prefix. DefaultPortPrefix = "netnsv0" )
Variables ¶
View Source
var ( // ErrBridgeNameEmpty holds the error for when the bridge name is empty. ErrBridgeNameEmpty = errors.New("bridge name cannot be empty") // ErrStateDirPathEmpty holds the error for when the state directory path // is empty. ErrStateDirPathEmpty = errors.New("state directory path cannot be empty") // ErrDatabaseDoesNotExist holds the error for when the database does not // exit. ErrDatabaseDoesNotExist = errors.New("database does not exist") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the object used for interacting with networks.
func (*Client) AllocateIP ¶
AllocateIP returns an unused IP for a specific process ID and saves it in the database.
func (*Client) Create ¶
func (c *Client) Create(s *specs.State, brOpt bridge.Opt, staticip string, configure bool) (net.IP, error)
Create returns a container IP that was created with the given bridge name, the settings from the spec.State passed, and the bridge options.
Click to show internal directories.
Click to hide internal directories.