Version: v0.5.6 Latest Latest

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

Go to latest
Published: Jan 15, 2016 License: Apache-2.0 Imports: 2 Imported by: 0



Package api represents all requests and responses suitable for conversation with a remote driver.



This section is empty.


This section is empty.


This section is empty.


type CreateEndpointRequest

type CreateEndpointRequest struct {
	// Provided at create time, this will be the network id referenced.
	NetworkID string
	// The ID of the endpoint for later reference.
	EndpointID string
	Interface  *EndpointInterface
	Options    map[string]interface{}

CreateEndpointRequest is the request to create an endpoint within a network.

type CreateEndpointResponse

type CreateEndpointResponse struct {
	Interface *EndpointInterface

CreateEndpointResponse is the response to the CreateEndpoint action.

type CreateNetworkRequest

type CreateNetworkRequest struct {
	// A network ID that remote plugins are expected to store for future
	// reference.
	NetworkID string

	// A free form map->object interface for communication of options.
	Options map[string]interface{}

	// IPAMData contains the address pool information for this network
	IPv4Data, IPv6Data []driverapi.IPAMData

CreateNetworkRequest requests a new network.

type CreateNetworkResponse

type CreateNetworkResponse struct {

CreateNetworkResponse is the response to the CreateNetworkRequest.

type DeleteEndpointRequest

type DeleteEndpointRequest struct {
	NetworkID  string
	EndpointID string

DeleteEndpointRequest describes the API for deleting an endpoint.

type DeleteEndpointResponse

type DeleteEndpointResponse struct {

DeleteEndpointResponse is the response to the DeleteEndpoint action.

type DeleteNetworkRequest

type DeleteNetworkRequest struct {
	// The ID of the network to delete.
	NetworkID string

DeleteNetworkRequest is the request to delete an existing network.

type DeleteNetworkResponse

type DeleteNetworkResponse struct {

DeleteNetworkResponse is the response to a request for deleting a network.

type DiscoveryNotification

type DiscoveryNotification struct {
	DiscoveryType driverapi.DiscoveryType
	DiscoveryData interface{}

DiscoveryNotification represents a discovery notification

type DiscoveryResponse

type DiscoveryResponse struct {

DiscoveryResponse is used by libnetwork to log any plugin error processing the discovery notifications

type EndpointInfoRequest

type EndpointInfoRequest struct {
	NetworkID  string
	EndpointID string

EndpointInfoRequest retrieves information about the endpoint from the network driver.

type EndpointInfoResponse

type EndpointInfoResponse struct {
	Value map[string]interface{}

EndpointInfoResponse is the response to an EndpointInfoRequest.

type EndpointInterface

type EndpointInterface struct {
	Address     string
	AddressIPv6 string
	MacAddress  string

EndpointInterface represents an interface endpoint.

type GetCapabilityResponse

type GetCapabilityResponse struct {
	Scope string

GetCapabilityResponse is the response of GetCapability request

type Interface

type Interface struct {
	Address     *net.IPNet
	AddressIPv6 *net.IPNet
	MacAddress  net.HardwareAddr

Interface is the representation of a linux interface.

type InterfaceName

type InterfaceName struct {
	SrcName   string
	DstName   string
	DstPrefix string

InterfaceName is the struct represetation of a pair of devices with source and destination, for the purposes of putting an endpoint into a container.

type JoinRequest

type JoinRequest struct {
	NetworkID  string
	EndpointID string
	SandboxKey string
	Options    map[string]interface{}

JoinRequest describes the API for joining an endpoint to a sandbox.

type JoinResponse

type JoinResponse struct {
	InterfaceName         *InterfaceName
	Gateway               string
	GatewayIPv6           string
	StaticRoutes          []StaticRoute
	DisableGatewayService bool

JoinResponse is the response to a JoinRequest.

type LeaveRequest

type LeaveRequest struct {
	NetworkID  string
	EndpointID string

LeaveRequest describes the API for detaching an endpoint from a sandbox.

type LeaveResponse

type LeaveResponse struct {

LeaveResponse is the answer to LeaveRequest.

type Response

type Response struct {
	Err 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.

type StaticRoute

type StaticRoute struct {
	Destination string
	RouteType   int
	NextHop     string

StaticRoute is the plain JSON representation of a static route.

Source Files

Jump to

Keyboard shortcuts

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