Documentation ¶
Index ¶
- func ConfigureHandler(sdkhandler sdk.Handler, driver Ipam)
- type AddressSpacesResponse
- type CapabilitiesResponse
- type ErrorResponse
- type Handler
- type Ipam
- type ReleaseAddressRequest
- type ReleasePoolRequest
- type RequestAddressRequest
- type RequestAddressResponse
- type RequestPoolRequest
- type RequestPoolResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureHandler ¶ added in v1.2.0
ConfigureHandler adds routes to the sdk.Handler to handle the Ipam plugin API
Types ¶
type AddressSpacesResponse ¶
type AddressSpacesResponse struct { LocalDefaultAddressSpace string GlobalDefaultAddressSpace string }
AddressSpacesResponse returns the default local and global address space names for this IPAM
type CapabilitiesResponse ¶
type CapabilitiesResponse struct {
RequiresMACAddress bool
}
CapabilitiesResponse returns whether or not this IPAM required pre-made MAC
type ErrorResponse ¶
type ErrorResponse struct {
Err string
}
ErrorResponse is a formatted error message that libnetwork can understand
func NewErrorResponse ¶
func NewErrorResponse(msg string) *ErrorResponse
NewErrorResponse creates an ErrorResponse with the provided message
type Handler ¶
Handler forwards requests and responses between the docker daemon and the plugin.
func NewHandler ¶
func NewHandler(logger logrus.FieldLogger, driver Ipam) *Handler
NewHandler initializes the request handler with a driver implementation.
type Ipam ¶
type Ipam interface { GetCapabilities(context.Context) (*CapabilitiesResponse, error) GetDefaultAddressSpaces(context.Context) (*AddressSpacesResponse, error) RequestPool(context.Context, *RequestPoolRequest) (*RequestPoolResponse, error) ReleasePool(context.Context, *ReleasePoolRequest) error RequestAddress(context.Context, *RequestAddressRequest) (*RequestAddressResponse, error) ReleaseAddress(context.Context, *ReleaseAddressRequest) error }
Ipam represent the interface a driver must fulfill.
type ReleaseAddressRequest ¶
ReleaseAddressRequest is sent in order to release an address from the pool
type ReleasePoolRequest ¶
type ReleasePoolRequest struct {
PoolID string
}
ReleasePoolRequest is sent when releasing a previously registered address pool
type RequestAddressRequest ¶
RequestAddressRequest is sent when requesting an address from IPAM
type RequestAddressResponse ¶
RequestAddressResponse is formed with allocated address by IPAM