client

package
v0.0.0-...-92a250d Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RecordNotFoundError error = errors.New("record not found")

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Action            string
	Method            string
	URL               string
	RequestPayload    interface{}
	ResponseResult    interface{}
	SuccessStatusCode int
	MeaningfulErrors  map[int]error
}

type DaemonClient

type DaemonClient struct {
	JSONClient JSONClient
}

func New

func New(baseURL string, httpClient *http.Client) *DaemonClient

func (*DaemonClient) CNIAdd

func (d *DaemonClient) CNIAdd(input *skel.CmdArgs) (types.Result, error)

func (*DaemonClient) CNIDel

func (d *DaemonClient) CNIDel(input *skel.CmdArgs) error

func (*DaemonClient) ContainerDown

func (d *DaemonClient) ContainerDown(payload models.CNIDelPayload) error

func (*DaemonClient) ContainerUp

func (d *DaemonClient) ContainerUp(payload models.CNIAddPayload) (types.Result, error)

func (*DaemonClient) GetContainer

func (d *DaemonClient) GetContainer(containerID string) (models.Container, error)

func (*DaemonClient) ListContainers

func (d *DaemonClient) ListContainers() ([]models.Container, error)

func (*DaemonClient) ListNetworkContainers

func (d *DaemonClient) ListNetworkContainers(networkID string) ([]models.Container, error)

type JSONClient

type JSONClient struct {
	BaseURL     string
	Marshaler   marshal.Marshaler
	Unmarshaler marshal.Unmarshaler
	HttpClient  httpClient
}

func (*JSONClient) BuildAndDo

func (d *JSONClient) BuildAndDo(config ClientConfig) error

Jump to

Keyboard shortcuts

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