cnsclient

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCNSClientCommands added in v1.1.9

func HandleCNSClientCommands(cmd, arg string) error

Types

type APIClient added in v1.1.5

type APIClient interface {
	ReconcileNCState(nc *cns.CreateNetworkContainerRequest, pods map[string]cns.KubernetesPodInfo, scalar nnc.Scaler, spec nnc.NodeNetworkConfigSpec) error
	CreateOrUpdateNC(nc cns.CreateNetworkContainerRequest, scalar nnc.Scaler, spec nnc.NodeNetworkConfigSpec) error
}

APIClient interface to update cns state

type CNSClient

type CNSClient struct {
	// contains filtered or unexported fields
}

CNSClient specifies a client to connect to Ipam Plugin.

func GetCnsClient added in v1.0.29

func GetCnsClient() (*CNSClient, error)

GetCnsClient returns the cns client object

func InitCnsClient added in v1.0.29

func InitCnsClient(url string) (*CNSClient, error)

InitCnsClient initializes new cns client and returns the object

func (*CNSClient) CreateHostNCApipaEndpoint added in v1.0.29

func (cnsClient *CNSClient) CreateHostNCApipaEndpoint(networkContainerID string) (string, error)

CreateHostNCApipaEndpoint creates an endpoint in APIPA network for host container connectivity.

func (*CNSClient) DeleteHostNCApipaEndpoint added in v1.0.29

func (cnsClient *CNSClient) DeleteHostNCApipaEndpoint(networkContainerID string) error

DeleteHostNCApipaEndpoint deletes the endpoint in APIPA network created for host container connectivity.

func (*CNSClient) GetIPAddressesMatchingStates added in v1.1.9

func (cnsClient *CNSClient) GetIPAddressesMatchingStates(StateFilter ...string) ([]cns.IPAddressState, error)

GetIPAddressesWithStates takes a variadic number of string parameters, to get all IP Addresses matching a number of states usage GetIPAddressesWithStates(cns.Available, cns.Allocated)

func (*CNSClient) GetNetworkConfiguration

func (cnsClient *CNSClient) GetNetworkConfiguration(orchestratorContext []byte) (
	*cns.GetNetworkContainerResponse, error)

GetNetworkConfiguration Request to get network config.

func (*CNSClient) ReleaseIPAddress added in v1.1.5

func (cnsClient *CNSClient) ReleaseIPAddress(orchestratorContext []byte) error

ReleaseIPAddress calls releaseIPAddress on CNS

func (*CNSClient) RequestIPAddress added in v1.1.5

func (cnsClient *CNSClient) RequestIPAddress(orchestratorContext []byte) (*cns.IPConfigResponse, error)

RequestIPAddress calls the requestIPAddress in CNS

type CNSClientError added in v1.1.9

type CNSClientError struct {
	Code int
	Err  error
}

CNSClientError records an error and relevant code

func (*CNSClientError) Error added in v1.1.9

func (e *CNSClientError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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