restserver

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Success                         = 0
	UnsupportedNetworkType          = 1
	InvalidParameter                = 2
	UnsupportedEnvironment          = 3
	UnreachableHost                 = 4
	ReservationNotFound             = 5
	MalformedSubnet                 = 8
	UnreachableDockerDaemon         = 9
	UnspecifiedNetworkName          = 10
	NotFound                        = 14
	AddressUnavailable              = 15
	NetworkContainerNotSpecified    = 16
	CallToHostFailed                = 17
	UnknownContainerID              = 18
	UnsupportedOrchestratorType     = 19
	DockerContainerNotSpecified     = 20
	UnsupportedVerb                 = 21
	UnsupportedNetworkContainerType = 22
	InvalidRequest                  = 23
	NetworkJoinFailed               = 24
	NetworkContainerPublishFailed   = 25
	NetworkContainerUnpublishFailed = 26
	UnexpectedError                 = 99
)

Container Network Service remote API Contract.

Variables

This section is empty.

Functions

func ReturnCodeToString added in v1.0.16

func ReturnCodeToString(returnCode int) (s string)

ReturnCodeToString - Converts an error code to appropriate string.

Types

type HTTPRestService

type HTTPRestService struct {
	*cns.Service
	// contains filtered or unexported fields
}

HTTPRestService represents http listener for CNS - Container Networking Service.

func (*HTTPRestService) GetPartitionKey

func (service *HTTPRestService) GetPartitionKey() (dncPartitionKey string)

GetPartitionKey - Get dnc/service partition key

func (*HTTPRestService) Start

func (service *HTTPRestService) Start(config *common.ServiceConfig) error

Start starts the CNS listener.

func (*HTTPRestService) Stop

func (service *HTTPRestService) Stop()

Stop stops the CNS.

type HTTPService added in v1.0.0

type HTTPService interface {
	common.ServiceAPI
}

HTTPService describes the min API interface that every service should have.

func NewHTTPRestService

func NewHTTPRestService(config *common.ServiceConfig) (HTTPService, error)

NewHTTPRestService creates a new HTTP Service object.

Jump to

Keyboard shortcuts

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