gonet

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

gonet

The go library for linux network

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteLink(name string) error

DeleteLink is used to delete the link object

Types

type LinuxLink interface {
	Up() error
	Down() error
	SetName(name string) error
	Ifconfig(ip net.IP, netmask net.IPMask) error
	SetToNetNs(nspid int, newName string, ip net.IP, mask net.IPMask) error
	SetToDockerNs(containerID, newName string, ip net.IP, mask net.IPMask) error
}

LinuxLink is the main interface towards the outside It describes the API of the link

func LinuxLinkByName

func LinuxLinkByName(name string) (LinuxLink, error)

LinuxLinkByName is used to get the link object

type VethLinkPair

type VethLinkPair interface {
	SetPeerIntoNetNS(netnspid int, newName string, ip net.IP, mask net.IPMask) error
}

VethLinkPair is the interface of linux veth link pair

func NewVethLinkPair

func NewVethLinkPair(ifcName, peerName string) (VethLinkPair, error)

NewVethLinkPair ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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