vxlan

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

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)

func (*Device) AddARP

func (d *Device) AddARP(MAC net.HardwareAddr, IP net.IP) error

func (*Device) AddFDB

func (d *Device) AddFDB(MAC net.HardwareAddr, IP net.IP) error

func (*Device) Create

func (d *Device) Create() error

func (*Device) DelARP

func (d *Device) DelARP(MAC net.HardwareAddr, IP net.IP) error

func (*Device) DelFDB

func (d *Device) DelFDB(MAC net.HardwareAddr, IP net.IP) error

func (*Device) GetAddr

func (d *Device) GetAddr() string

func (*Device) GetHardware

func (d *Device) GetHardware() string

func (*Device) GetIndex

func (d *Device) GetIndex() int

func (*Device) GetName

func (d *Device) GetName() string

func (*Device) SetIP

func (d *Device) SetIP(nt net.IPNet) error

func (*Device) SetUp

func (d *Device) SetUp() 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 New

func New() (*Network, error)

func (*Network) AddInterface

func (n *Network) AddInterface() error

func (*Network) Create

func (n *Network) Create(ctx context.Context, network *types.SubnetManifest) (*types.NetworkState, error)

func (*Network) Destroy

func (n *Network) Destroy(ctx context.Context, network *types.NetworkState) error

func (*Network) Info

func (n *Network) Info(ctx context.Context) *types.NetworkState

func (*Network) Replace

func (n *Network) Replace(ctx context.Context, state *types.NetworkState, manifest *types.SubnetManifest) (*types.NetworkState, error)

func (*Network) SetSubnetFromDevice

func (n *Network) SetSubnetFromDevice(name string) error

func (*Network) Subnets

func (n *Network) Subnets(ctx context.Context) (map[string]*types.NetworkState, error)

type NetworkInterface

type NetworkInterface struct {
	Iface     *net.Interface
	IfaceAddr net.IP
}

Jump to

Keyboard shortcuts

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