network

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NoneProtocol = "none"
)
View Source
const (
	ProtocolDHCP = "dhcp"
)
View Source
const (
	ProtocolStatic = "static"
)

Variables

This section is empty.

Functions

func DeviceUp

func DeviceUp(n string) error

func PortCreate

func PortCreate(n string) error

Types

type Interface

type Interface interface {
	Name() string
	Protocol() string
	Configure() error
	Clear() error
	IPs() ([]netlink.Addr, error)
	SetUP(bool) error
}

type NetworkManager

type NetworkManager interface {
	Initialize() error
	Interfaces() ([]Interface, error)
	// contains filtered or unexported methods
}

func GetNetworkManager

func GetNetworkManager(filename string) (NetworkManager, error)

GetNetworkManager gets a new manager and loads settings from the provided toml file

type Protocol

type Protocol interface {
	Configure(mgr NetworkManager, inf string) error
}

func GetProtocol

func GetProtocol(name string) (Protocol, error)

type StaticProtocol

type StaticProtocol interface {
	Protocol
	ConfigureStatic(ip *net.IPNet, inf string) error
}

Jump to

Keyboard shortcuts

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