api

package
v0.7.0-dev.10 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 {
	Response
	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 {
	Response
}

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 {
	Response
}

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 {
	Response
}

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

type DiscoveryNotification

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

DiscoveryNotification represents a discovery notification

type DiscoveryResponse

type DiscoveryResponse struct {
	Response
}

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 {
	Response
	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 {
	Response
	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 {
	Response
	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 {
	Response
}

LeaveResponse is the answer to LeaveRequest.

type ProgramExternalConnectivityRequest

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

ProgramExternalConnectivityRequest describes the API for programming the external connectivity for the given endpoint.

type ProgramExternalConnectivityResponse

type ProgramExternalConnectivityResponse struct {
	Response
}

ProgramExternalConnectivityResponse is the answer to ProgramExternalConnectivityRequest.

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 RevokeExternalConnectivityRequest

type RevokeExternalConnectivityRequest struct {
	NetworkID  string
	EndpointID string
}

RevokeExternalConnectivityRequest describes the API for revoking the external connectivity for the given endpoint.

type RevokeExternalConnectivityResponse

type RevokeExternalConnectivityResponse struct {
	Response
}

RevokeExternalConnectivityResponse is the answer to RevokeExternalConnectivityRequest.

type StaticRoute

type StaticRoute struct {
	Destination string
	RouteType   int
	NextHop     string
}

StaticRoute is the plain JSON representation of a static route.

Jump to

Keyboard shortcuts

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