Documentation
¶
Index ¶
- func HandleCNSClientCommands(cmd, arg string) error
- func IsNotFound(err error) bool
- type APIClient
- type CNSClient
- func (cnsClient *CNSClient) CreateHostNCApipaEndpoint(networkContainerID string) (string, error)
- func (cnsClient *CNSClient) DeleteHostNCApipaEndpoint(networkContainerID string) error
- func (cnsClient *CNSClient) GetHTTPServiceData() (restserver.GetHTTPServiceDataResponse, error)
- func (cnsClient *CNSClient) GetIPAddressesMatchingStates(stateFilter ...cns.IPConfigState) ([]cns.IPConfigurationStatus, error)
- func (cnsClient *CNSClient) GetNetworkConfiguration(orchestratorContext []byte) (*cns.GetNetworkContainerResponse, error)
- func (cnsClient *CNSClient) GetPodOrchestratorContext() (map[string]string, error)
- func (cnsClient *CNSClient) ReleaseIPAddress(ipconfig *cns.IPConfigRequest) error
- func (cnsClient *CNSClient) RequestIPAddress(ipconfig *cns.IPConfigRequest) (*cns.IPConfigResponse, error)
- type CNSClientError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCNSClientCommands ¶ added in v1.1.9
func IsNotFound ¶ added in v1.4.9
IsNotFound tests if the provided error is of type CNSClientError and then further tests if the error code is of type UnknowContainerID
Types ¶
type APIClient ¶ added in v1.1.5
type APIClient interface { ReconcileNCState(nc *cns.CreateNetworkContainerRequest, pods map[string]cns.PodInfo, scalar v1alpha.Scaler, spec v1alpha.NodeNetworkConfigSpec) error CreateOrUpdateNC(nc cns.CreateNetworkContainerRequest) error UpdateIPAMPoolMonitor(scalar v1alpha.Scaler, spec v1alpha.NodeNetworkConfigSpec) GetNC(nc cns.GetNetworkContainerRequest) (cns.GetNetworkContainerResponse, error) DeleteNC(nc cns.DeleteNetworkContainerRequest) 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
GetCnsClient returns the cns client object
func InitCnsClient ¶ added in v1.0.29
InitCnsClient initializes new cns client and returns the object
func (*CNSClient) CreateHostNCApipaEndpoint ¶ added in v1.0.29
CreateHostNCApipaEndpoint creates an endpoint in APIPA network for host container connectivity.
func (*CNSClient) DeleteHostNCApipaEndpoint ¶ added in v1.0.29
DeleteHostNCApipaEndpoint deletes the endpoint in APIPA network created for host container connectivity.
func (*CNSClient) GetHTTPServiceData ¶ added in v1.2.9
func (cnsClient *CNSClient) GetHTTPServiceData() (restserver.GetHTTPServiceDataResponse, error)
GetHTTPServiceData gets all public in-memory struct details for debugging purpose
func (*CNSClient) GetIPAddressesMatchingStates ¶ added in v1.1.9
func (cnsClient *CNSClient) GetIPAddressesMatchingStates(stateFilter ...cns.IPConfigState) ([]cns.IPConfigurationStatus, 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) GetPodOrchestratorContext ¶ added in v1.2.9
GetPodOrchestratorContext calls GetPodIpOrchestratorContext API on CNS
func (*CNSClient) ReleaseIPAddress ¶ added in v1.1.5
func (cnsClient *CNSClient) ReleaseIPAddress(ipconfig *cns.IPConfigRequest) error
ReleaseIPAddress calls releaseIPAddress on CNS, ipaddress ex: (10.0.0.1)
func (*CNSClient) RequestIPAddress ¶ added in v1.1.5
func (cnsClient *CNSClient) RequestIPAddress(ipconfig *cns.IPConfigRequest) (*cns.IPConfigResponse, error)
RequestIPAddress calls the requestIPAddress in CNS
type CNSClientError ¶ added in v1.1.9
type CNSClientError struct { Code types.ResponseCode Err error }
CNSClientError records an error and relevant code
func (*CNSClientError) Error ¶ added in v1.1.9
func (e *CNSClientError) Error() string