network

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

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
}

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