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
Click to show internal directories.
Click to hide internal directories.