Documentation ¶
Index ¶
- Constants
- type CreateNetworkRequest
- type DeleteNetworkRequest
- type GetIPAddressesResponse
- type HostLocalIPAddressResponse
- type IPAddressesUtilizationResponse
- type NodeConfiguration
- type OptionMap
- type OverlayConfiguration
- type ReleaseIPAddressRequest
- type ReserveIPAddressRequest
- type ReserveIPAddressResponse
- type Response
- type Service
- type SetEnvironmentRequest
- type Subnet
Constants ¶
const ( SetEnvironmentPath = "/network/environment" CreateNetworkPath = "/network/create" DeleteNetworkPath = "/network/delete" ReserveIPAddressPath = "/network/ip/reserve" ReleaseIPAddressPath = "/network/ip/release" GetHostLocalIPPath = "/network/ip/hostlocal" GetIPAddressUtilizationPath = "/network/ip/utilization" GetUnhealthyIPAddressesPath = "/network/ipaddresses/unhealthy" GetHealthReportPath = "/network/health" V1Prefix = "/v0.1" )
Container Network Service remote API Contract
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNetworkRequest ¶
type CreateNetworkRequest struct { NetworkName string OverlayConfiguration OverlayConfiguration Options map[string]interface{} }
CreateNetworkRequest describes request to create the network.
type DeleteNetworkRequest ¶
type DeleteNetworkRequest struct {
NetworkName string
}
DeleteNetworkRequest describes request to delete the network.
type GetIPAddressesResponse ¶
GetIPAddressesResponse describes response containing requested ip addresses.
type HostLocalIPAddressResponse ¶
HostLocalIPAddressResponse describes reponse that returns the host local IP Address.
type IPAddressesUtilizationResponse ¶
type IPAddressesUtilizationResponse struct { Response Response Available int Reserved int Unhealthy int }
IPAddressesUtilizationResponse describes response for ip address utilization.
type NodeConfiguration ¶
NodeConfiguration describes confguration for a node in overlay network.
type OptionMap ¶
type OptionMap map[string]interface{}
OptionMap describes generic options that can be passed to CNS.
type OverlayConfiguration ¶
type OverlayConfiguration struct { NodeCount int LocalNodeIP string OverlaySubent Subnet NodeConfig []NodeConfiguration }
OverlayConfiguration describes configuration for all the nodes that are part of overlay.
type ReleaseIPAddressRequest ¶
type ReleaseIPAddressRequest struct {
ReservationID string
}
ReleaseIPAddressRequest describes request to release an IP Address.
type ReserveIPAddressRequest ¶
type ReserveIPAddressRequest struct {
ReservationID string
}
ReserveIPAddressRequest describes request to reserve an IP Address
type ReserveIPAddressResponse ¶
ReserveIPAddressResponse describes response to reserve an IP address.
type Service ¶
Service defines Container Networking Service.
func NewService ¶
func NewService(name, version string, store store.KeyValueStore) (*Service, error)
NewService creates a new Service object.
func (*Service) Initialize ¶
func (service *Service) Initialize(config *common.ServiceConfig) error
Initialize initializes the service and starts the listener.
func (*Service) ParseOptions ¶
ParseOptions returns generic options from a libnetwork request.
func (*Service) SendErrorResponse ¶
func (service *Service) SendErrorResponse(w http.ResponseWriter, errMsg error)
SendErrorResponse sends and logs an error response.
func (*Service) Uninitialize ¶
func (service *Service) Uninitialize()
Uninitialize cleans up the plugin.
type SetEnvironmentRequest ¶
SetEnvironmentRequest describes the Request to set the environment in CNS.