Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceConfig ¶
type InterfaceConfig struct { ID string Type InterfaceType IP net.IP MAC net.HardwareAddr PodName string PodNamespace string NetNS string *OVSPortConfig }
func NewContainerInterface ¶
func NewContainerInterface(containerID string, podName string, podNamespace string, containerNetNS string, mac net.HardwareAddr, ip net.IP) *InterfaceConfig
NewContainerInterface creates container interface configuration
func NewGatewayInterface ¶
func NewGatewayInterface(gatewayName string) *InterfaceConfig
NewGatewayInterface creates host gateway interface configuration
func NewTunnelInterface ¶
func NewTunnelInterface(tunnelName string) *InterfaceConfig
NewTunnelInterface creates tunnel port interface configuration
type InterfaceStore ¶
type InterfaceStore interface { Initialize(interfaces []*InterfaceConfig) AddInterface(ifaceID string, interfaceConfig *InterfaceConfig) DeleteInterface(ifaceID string) GetInterface(ifaceID string) (*InterfaceConfig, bool) GetContainerInterface(podName string, podNamespace string) (*InterfaceConfig, bool) GetContainerInterfaceNum() int Len() int GetInterfaceIDs() []string }
InterfaceStore is a service interface to create local interfaces for container, host gateway, and tunnel port. Support add/delete/get operations
func NewInterfaceStore ¶
func NewInterfaceStore() InterfaceStore
type InterfaceType ¶
type InterfaceType uint8
const ( // ContainerInterface is used to mark current interface is for container ContainerInterface InterfaceType = iota // GatewayInterface is used to mark current interface is for host gateway GatewayInterface // TunnelInterface is used to mark current interface is for tunnel port TunnelInterface )
type OVSPortConfig ¶
Click to show internal directories.
Click to hide internal directories.