driver

package
v0.0.0-...-fcacf22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	ID          string           `json:"id"`
	Device      netlink.Veth     `json:"dev"`
	IPAddress   net.IP           `json:"ip"`
	MacAddress  net.HardwareAddr `json:"mac"`
	Network     *Network         `json:"network"`
	PortMapping []string         `json:"portmap"`
}

Endpoint Contains connection information, IP address, Veth device, port mapping, connected containers and networks, etc.

type Interface

type Interface interface {
	// Name return name of driver
	Name() string
	Create(subnet string, name string) (*Network, error)
	Delete(network string) error
	// Connect container Endpoint to Network
	Connect(network string, endpoint *Endpoint) error
	// Disconnect remove container Endpoint in Network
	Disconnect(network string, endpoint *Endpoint) error
}

Interface network driver interface

type Network

type Network struct {
	Name    string     `json:"name"`
	Driver  string     `json:"driver"`
	IpRange *net.IPNet `json:"iprange"`
}

Network configuration

func (*Network) Dump

func (n *Network) Dump(dumpPath string) error

func (*Network) Load

func (n *Network) Load(dumpPath string) error

func (*Network) Remove

func (n *Network) Remove(dumpPath string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL