Documentation ¶
Index ¶
- type ContainerInterfaceConfig
- type InterfaceConfig
- func NewContainerInterface(interfaceName string, containerID string, podName string, podNamespace string, ...) *InterfaceConfig
- func NewGatewayInterface(gatewayName string) *InterfaceConfig
- func NewIPSecTunnelInterface(interfaceName string, tunnelType ovsconfig.TunnelType, nodeName string, ...) *InterfaceConfig
- func NewTunnelInterface(tunnelName string, tunnelType ovsconfig.TunnelType, localIP net.IP, csum bool) *InterfaceConfig
- func NewUplinkInterface(uplinkName string) *InterfaceConfig
- type InterfaceStore
- type InterfaceType
- type OVSPortConfig
- type TunnelInterfaceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInterfaceConfig ¶ added in v0.3.0
type InterfaceConfig ¶
type InterfaceConfig struct { Type InterfaceType // Unique name of the interface, also used for the OVS port name. InterfaceName string IP net.IP MAC net.HardwareAddr *OVSPortConfig *ContainerInterfaceConfig *TunnelInterfaceConfig }
func NewContainerInterface ¶
func NewContainerInterface( interfaceName string, containerID string, podName string, podNamespace string, mac net.HardwareAddr, ip net.IP) *InterfaceConfig
NewContainerInterface creates InterfaceConfig for a Pod.
func NewGatewayInterface ¶
func NewGatewayInterface(gatewayName string) *InterfaceConfig
NewGatewayInterface creates InterfaceConfig for the host gateway interface.
func NewIPSecTunnelInterface ¶ added in v0.3.0
func NewIPSecTunnelInterface(interfaceName string, tunnelType ovsconfig.TunnelType, nodeName string, nodeIP net.IP, psk string) *InterfaceConfig
NewIPSecTunnelInterface creates InterfaceConfig for the IPSec tunnel to the Node.
func NewTunnelInterface ¶
func NewTunnelInterface(tunnelName string, tunnelType ovsconfig.TunnelType, localIP net.IP, csum bool) *InterfaceConfig
NewTunnelInterface creates InterfaceConfig for the default tunnel port interface.
func NewUplinkInterface ¶ added in v0.7.0
func NewUplinkInterface(uplinkName string) *InterfaceConfig
NewUplinkInterface creates InterfaceConfig for the uplink interface.
type InterfaceStore ¶
type InterfaceStore interface { Initialize(interfaces []*InterfaceConfig) AddInterface(interfaceConfig *InterfaceConfig) DeleteInterface(interfaceConfig *InterfaceConfig) GetInterface(interfaceKey string) (*InterfaceConfig, bool) GetInterfaceByName(interfaceName string) (*InterfaceConfig, bool) GetContainerInterface(containerID string) (*InterfaceConfig, bool) GetContainerInterfacesByPod(podName string, podNamespace string) []*InterfaceConfig GetInterfaceByIP(interfaceIP string) (*InterfaceConfig, bool) GetNodeTunnelInterface(nodeName string) (*InterfaceConfig, bool) GetContainerInterfaceNum() int GetInterfacesByType(interfaceType InterfaceType) []*InterfaceConfig Len() int GetInterfaceKeysByType(interfaceType InterfaceType) []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 // UplinkInterface is used to mark current interface is for uplink port UplinkInterface )
func (InterfaceType) String ¶ added in v0.7.2
func (t InterfaceType) String() string
type OVSPortConfig ¶
type TunnelInterfaceConfig ¶ added in v0.3.0
type TunnelInterfaceConfig struct { Type ovsconfig.TunnelType // Name of the remote Node. NodeName string // IP address of the local Node. LocalIP net.IP // IP address of the remote Node. RemoteIP net.IP PSK string // Whether options:csum is set for this tunnel interface. // If true, encapsulation header UDP checksums will be computed on outgoing packets. Csum bool }
Click to show internal directories.
Click to hide internal directories.