network

package
v1.20.9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetManager

type NetManager interface {
	Init() error                                       //manager init
	Stop()                                             //manager stop if necessary
	GetPlugin(name string) NetworkPlugin               //get plugin by name
	AddPlugin(name string, plguin NetworkPlugin) error //Add plugin to manager dynamic if necessary
	SetUpPod(podInfo container.Pod) error              //for setting Pod network interface
	TearDownPod(podInfo container.Pod) error           //for release pod network resource
}

NetManager manager for NetworkPlugin

type NetStatus

type NetStatus struct {
	IfName  string    `json:"ifname"`  //device name
	IP      net.IP    `json:"ip"`      //ip address for pod
	Net     net.IPNet `json:"net"`     //net for ip address, including network mask
	Gateway net.IP    `json:"gateway"` //network gateway
}

NetStatus hold pod network info

type NetworkPlugin

type NetworkPlugin interface {
	Name() string //Get plugin name
	//Type() string                            //Get plugin type, executable binary name
	Init(host string) error //init Plugin
	//Status() *NetStatus                      //get network status
	//Version() string                         //Plugin version
	SetUpPod(podInfo container.Pod) error    //Setup Network info for pod
	TearDownPod(podInfo container.Pod) error //Teardown pod network info
}

NetworkPlugin defination for all network

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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