api

package
v0.0.0-...-460b4ae Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api defines the data structure to be used in the request/response messages between libnetwork and the remote ipam plugin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetAddressSpacesResponse

type GetAddressSpacesResponse struct {
	Response
	LocalDefaultAddressSpace  string
	GlobalDefaultAddressSpace string
}

GetAddressSpacesResponse is the response to the “get default address spaces“ request message

type GetCapabilityResponse

type GetCapabilityResponse struct {
	Response
	RequiresMACAddress    bool
	RequiresRequestReplay bool
}

GetCapabilityResponse is the response of GetCapability request

func (GetCapabilityResponse) ToCapability

func (capRes GetCapabilityResponse) ToCapability() *ipamapi.Capability

ToCapability converts the capability response into the internal ipam driver capability structure

type ReleaseAddressRequest

type ReleaseAddressRequest struct {
	PoolID  string
	Address string
}

ReleaseAddressRequest represents the expected data in a “release address“ request message

type ReleaseAddressResponse

type ReleaseAddressResponse struct {
	Response
}

ReleaseAddressResponse represents the response message to a “release address“ request

type ReleasePoolRequest

type ReleasePoolRequest struct {
	PoolID string
}

ReleasePoolRequest represents the expected data in a “release address pool“ request message

type ReleasePoolResponse

type ReleasePoolResponse struct {
	Response
}

ReleasePoolResponse represents the response message to a “release address pool“ request

type RequestAddressRequest

type RequestAddressRequest struct {
	PoolID  string
	Address string
	Options map[string]string
}

RequestAddressRequest represents the expected data in a “request address“ request message

type RequestAddressResponse

type RequestAddressResponse struct {
	Response
	Address string // in CIDR format
	Data    map[string]string
}

RequestAddressResponse represents the expected data in the response message to a “request address“ request

type RequestPoolRequest

type RequestPoolRequest struct {
	AddressSpace string
	Pool         string
	SubPool      string
	Options      map[string]string
	V6           bool
}

RequestPoolRequest represents the expected data in a “request address pool“ request message

type RequestPoolResponse

type RequestPoolResponse struct {
	Response
	PoolID string
	Pool   string // CIDR format
	Data   map[string]string
}

RequestPoolResponse represents the response message to a “request address pool“ request

type Response

type Response struct {
	Error string
}

Response is the basic response structure used in all responses

func (*Response) GetError

func (r *Response) GetError() string

GetError returns the error from the response, if any.

func (*Response) IsSuccess

func (r *Response) IsSuccess() bool

IsSuccess returns whether the plugin response is successful

Jump to

Keyboard shortcuts

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