Documentation ¶
Index ¶
- Constants
- func ConstructEndpointID(containerID string, netNsPath string, ifName string) (string, string)
- func DeleteSnatBridge() error
- type DNSInfo
- type EndpointClient
- type EndpointInfo
- type LinuxBridgeClient
- func (client *LinuxBridgeClient) AddL2Rules(extIf *externalInterface) error
- func (client *LinuxBridgeClient) CreateBridge() error
- func (client *LinuxBridgeClient) DeleteBridge() error
- func (client *LinuxBridgeClient) DeleteL2Rules(extIf *externalInterface)
- func (client *LinuxBridgeClient) SetBridgeMasterToHostInterface() error
- func (client *LinuxBridgeClient) SetHairpinOnHostInterface(enable bool) error
- type LinuxBridgeEndpointClient
- func (client *LinuxBridgeEndpointClient) AddEndpointRules(epInfo *EndpointInfo) error
- func (client *LinuxBridgeEndpointClient) AddEndpoints(epInfo *EndpointInfo) error
- func (client *LinuxBridgeEndpointClient) ConfigureContainerInterfacesAndRoutes(epInfo *EndpointInfo) error
- func (client *LinuxBridgeEndpointClient) DeleteEndpointRules(ep *endpoint)
- func (client *LinuxBridgeEndpointClient) DeleteEndpoints(ep *endpoint) error
- func (client *LinuxBridgeEndpointClient) MoveEndpointsToContainerNS(epInfo *EndpointInfo, nsID uintptr) error
- func (client *LinuxBridgeEndpointClient) SetupContainerInterfaces(epInfo *EndpointInfo) error
- type Namespace
- type NetworkClient
- type NetworkInfo
- type NetworkManager
- type OVSEndpointClient
- func (client *OVSEndpointClient) AddEndpointRules(epInfo *EndpointInfo) error
- func (client *OVSEndpointClient) AddEndpoints(epInfo *EndpointInfo) error
- func (client *OVSEndpointClient) ConfigureContainerInterfacesAndRoutes(epInfo *EndpointInfo) error
- func (client *OVSEndpointClient) DeleteEndpointRules(ep *endpoint)
- func (client *OVSEndpointClient) DeleteEndpoints(ep *endpoint) error
- func (client *OVSEndpointClient) MoveEndpointsToContainerNS(epInfo *EndpointInfo, nsID uintptr) error
- func (client *OVSEndpointClient) SetupContainerInterfaces(epInfo *EndpointInfo) error
- type OVSNetworkClient
- func (client *OVSNetworkClient) AddL2Rules(extIf *externalInterface) error
- func (client *OVSNetworkClient) CreateBridge() error
- func (client *OVSNetworkClient) DeleteBridge() error
- func (client *OVSNetworkClient) DeleteL2Rules(extIf *externalInterface)
- func (client *OVSNetworkClient) SetBridgeMasterToHostInterface() error
- func (client *OVSNetworkClient) SetHairpinOnHostInterface(enable bool) error
- type RouteInfo
- type SubnetInfo
Constants ¶
View Source
const ( SnatBridgeIPKey = "snatBridgeIP" LocalIPKey = "localIP" OptVethName = "vethname" )
View Source
const (
VlanIDKey = "VlanID"
)
Variables ¶
This section is empty.
Functions ¶
func ConstructEndpointID ¶
func DeleteSnatBridge ¶ added in v1.0.8
func DeleteSnatBridge() error
Types ¶
type EndpointClient ¶
type EndpointClient interface { AddEndpoints(epInfo *EndpointInfo) error AddEndpointRules(epInfo *EndpointInfo) error DeleteEndpointRules(ep *endpoint) MoveEndpointsToContainerNS(epInfo *EndpointInfo, nsID uintptr) error SetupContainerInterfaces(epInfo *EndpointInfo) error ConfigureContainerInterfacesAndRoutes(epInfo *EndpointInfo) error DeleteEndpoints(ep *endpoint) error }
type EndpointInfo ¶
type EndpointInfo struct { Id string ContainerID string NetNsPath string IfName string SandboxKey string IfIndex int MacAddress net.HardwareAddr DNS DNSInfo IPAddresses []net.IPNet Routes []RouteInfo Policies []policy.Policy Gateways []net.IP EnableSnatOnHost bool Data map[string]interface{} }
EndpointInfo contains read-only information about an endpoint.
type LinuxBridgeClient ¶
type LinuxBridgeClient struct {
// contains filtered or unexported fields
}
func NewLinuxBridgeClient ¶
func NewLinuxBridgeClient(bridgeName string, hostInterfaceName string, mode string) *LinuxBridgeClient
func (*LinuxBridgeClient) AddL2Rules ¶
func (client *LinuxBridgeClient) AddL2Rules(extIf *externalInterface) error
func (*LinuxBridgeClient) CreateBridge ¶
func (client *LinuxBridgeClient) CreateBridge() error
func (*LinuxBridgeClient) DeleteBridge ¶
func (client *LinuxBridgeClient) DeleteBridge() error
func (*LinuxBridgeClient) DeleteL2Rules ¶
func (client *LinuxBridgeClient) DeleteL2Rules(extIf *externalInterface)
func (*LinuxBridgeClient) SetBridgeMasterToHostInterface ¶
func (client *LinuxBridgeClient) SetBridgeMasterToHostInterface() error
func (*LinuxBridgeClient) SetHairpinOnHostInterface ¶
func (client *LinuxBridgeClient) SetHairpinOnHostInterface(enable bool) error
type LinuxBridgeEndpointClient ¶
type LinuxBridgeEndpointClient struct {
// contains filtered or unexported fields
}
func NewLinuxBridgeEndpointClient ¶
func NewLinuxBridgeEndpointClient( extIf *externalInterface, hostVethName string, containerVethName string, mode string, ) *LinuxBridgeEndpointClient
func (*LinuxBridgeEndpointClient) AddEndpointRules ¶
func (client *LinuxBridgeEndpointClient) AddEndpointRules(epInfo *EndpointInfo) error
func (*LinuxBridgeEndpointClient) AddEndpoints ¶
func (client *LinuxBridgeEndpointClient) AddEndpoints(epInfo *EndpointInfo) error
func (*LinuxBridgeEndpointClient) ConfigureContainerInterfacesAndRoutes ¶
func (client *LinuxBridgeEndpointClient) ConfigureContainerInterfacesAndRoutes(epInfo *EndpointInfo) error
func (*LinuxBridgeEndpointClient) DeleteEndpointRules ¶
func (client *LinuxBridgeEndpointClient) DeleteEndpointRules(ep *endpoint)
func (*LinuxBridgeEndpointClient) DeleteEndpoints ¶
func (client *LinuxBridgeEndpointClient) DeleteEndpoints(ep *endpoint) error
func (*LinuxBridgeEndpointClient) MoveEndpointsToContainerNS ¶
func (client *LinuxBridgeEndpointClient) MoveEndpointsToContainerNS(epInfo *EndpointInfo, nsID uintptr) error
func (*LinuxBridgeEndpointClient) SetupContainerInterfaces ¶
func (client *LinuxBridgeEndpointClient) SetupContainerInterfaces(epInfo *EndpointInfo) error
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace represents a network namespace.
func GetCurrentThreadNamespace ¶ added in v1.0.0
GetCurrentThreadNamespace returns the caller thread's current namespace.
func OpenNamespace ¶ added in v1.0.0
OpenNamespace creates a new namespace object for the given netns path.
type NetworkClient ¶
type NetworkInfo ¶
type NetworkInfo struct { Id string Mode string Subnets []SubnetInfo DNS DNSInfo Policies []policy.Policy BridgeName string EnableSnatOnHost bool Options map[string]interface{} }
NetworkInfo contains read-only information about a container network.
type NetworkManager ¶
type NetworkManager interface { Initialize(config *common.PluginConfig) error Uninitialize() AddExternalInterface(ifName string, subnet string) error CreateNetwork(nwInfo *NetworkInfo) error DeleteNetwork(networkId string) error GetNetworkInfo(networkId string) (*NetworkInfo, error) CreateEndpoint(networkId string, epInfo *EndpointInfo) error DeleteEndpoint(networkId string, endpointId string) error GetEndpointInfo(networkId string, endpointId string) (*EndpointInfo, error) AttachEndpoint(networkId string, endpointId string, sandboxKey string) (*endpoint, error) DetachEndpoint(networkId string, endpointId string) error }
NetworkManager API.
func NewNetworkManager ¶
func NewNetworkManager() (NetworkManager, error)
Creates a new network manager.
type OVSEndpointClient ¶
type OVSEndpointClient struct {
// contains filtered or unexported fields
}
func NewOVSEndpointClient ¶
func NewOVSEndpointClient( extIf *externalInterface, epInfo *EndpointInfo, hostVethName string, containerVethName string, vlanid int, ) *OVSEndpointClient
func (*OVSEndpointClient) AddEndpointRules ¶
func (client *OVSEndpointClient) AddEndpointRules(epInfo *EndpointInfo) error
func (*OVSEndpointClient) AddEndpoints ¶
func (client *OVSEndpointClient) AddEndpoints(epInfo *EndpointInfo) error
func (*OVSEndpointClient) ConfigureContainerInterfacesAndRoutes ¶
func (client *OVSEndpointClient) ConfigureContainerInterfacesAndRoutes(epInfo *EndpointInfo) error
func (*OVSEndpointClient) DeleteEndpointRules ¶
func (client *OVSEndpointClient) DeleteEndpointRules(ep *endpoint)
func (*OVSEndpointClient) DeleteEndpoints ¶
func (client *OVSEndpointClient) DeleteEndpoints(ep *endpoint) error
func (*OVSEndpointClient) MoveEndpointsToContainerNS ¶
func (client *OVSEndpointClient) MoveEndpointsToContainerNS(epInfo *EndpointInfo, nsID uintptr) error
func (*OVSEndpointClient) SetupContainerInterfaces ¶
func (client *OVSEndpointClient) SetupContainerInterfaces(epInfo *EndpointInfo) error
type OVSNetworkClient ¶
type OVSNetworkClient struct {
// contains filtered or unexported fields
}
func NewOVSClient ¶
func NewOVSClient(bridgeName, hostInterfaceName, snatBridgeIP string, enableSnatOnHost bool) *OVSNetworkClient
func (*OVSNetworkClient) AddL2Rules ¶
func (client *OVSNetworkClient) AddL2Rules(extIf *externalInterface) error
func (*OVSNetworkClient) CreateBridge ¶
func (client *OVSNetworkClient) CreateBridge() error
func (*OVSNetworkClient) DeleteBridge ¶
func (client *OVSNetworkClient) DeleteBridge() error
func (*OVSNetworkClient) DeleteL2Rules ¶
func (client *OVSNetworkClient) DeleteL2Rules(extIf *externalInterface)
func (*OVSNetworkClient) SetBridgeMasterToHostInterface ¶
func (client *OVSNetworkClient) SetBridgeMasterToHostInterface() error
func (*OVSNetworkClient) SetHairpinOnHostInterface ¶
func (client *OVSNetworkClient) SetHairpinOnHostInterface(enable bool) error
type SubnetInfo ¶
SubnetInfo contains subnet information for a container network.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.