Documentation
¶
Index ¶
- Constants
- type Device
- func (d *Device) AddARP(MAC net.HardwareAddr, IP net.IP) error
- func (d *Device) AddFDB(MAC net.HardwareAddr, IP net.IP) error
- func (d *Device) Create() error
- func (d *Device) DelARP(MAC net.HardwareAddr, IP net.IP) error
- func (d *Device) DelFDB(MAC net.HardwareAddr, IP net.IP) error
- func (d *Device) GetAddr() string
- func (d *Device) GetHardware() string
- func (d *Device) GetIndex() int
- func (d *Device) GetName() string
- func (d *Device) SetIP(nt net.IPNet) error
- func (d *Device) SetUp() error
- type DeviceCreateOpts
- type Network
- func (n *Network) AddInterface() error
- func (n *Network) Create(ctx context.Context, network *types.SubnetManifest) (*types.NetworkState, error)
- func (n *Network) Destroy(ctx context.Context, network *types.NetworkState) error
- func (n *Network) Info(ctx context.Context) *types.NetworkState
- func (n *Network) Replace(ctx context.Context, state *types.NetworkState, manifest *types.SubnetManifest) (*types.NetworkState, error)
- func (n *Network) SetSubnetFromDevice(name string) error
- func (n *Network) Subnets(ctx context.Context) (map[string]*types.NetworkState, error)
- type NetworkInterface
Constants ¶
View Source
const DefaultContainerDevice = "docker0"
View Source
const DeviceDefaultName = "lb"
View Source
const DeviceDefaultPort = 8472
View Source
const DeviceDefaultVNI = 0
View Source
const NetworkType = "vxlan"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func NewDevice ¶
func NewDevice(opts DeviceCreateOpts) (*Device, error)
type DeviceCreateOpts ¶
type DeviceCreateOpts struct {
// contains filtered or unexported fields
}
type Network ¶
type Network struct {
cni.CNI
ExtIface *NetworkInterface
IntIface *NetworkInterface
Device *Device
Network *net.IPNet
CIDR *net.IPNet
IP net.IP
}
func (*Network) Create ¶
func (n *Network) Create(ctx context.Context, network *types.SubnetManifest) (*types.NetworkState, error)
func (*Network) Destroy ¶
func (*Network) Replace ¶
func (n *Network) Replace(ctx context.Context, state *types.NetworkState, manifest *types.SubnetManifest) (*types.NetworkState, error)
Source Files
¶
- device.go
- network.go
Click to show internal directories.
Click to hide internal directories.