dockerapi

package
v0.0.0-...-035a00d Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2013 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESOURCE_PATH_INSPECT          = "/containers/%s/json"
	RESOURCE_PATH_CREATE_CONTAINER = "/containers/create"
	RESOURCE_PATH_START_CONTAINER  = "/containers/%s/start"
	RESOURCE_PATH_STOP_CONTAINER   = "/containers/%s/stop?t=%s"
	RESOURCE_PATH_REMOVE_CONTAINER = "/containers/%s?v=1"
)

Variables

This section is empty.

Functions

func CreateContainerResponseFromJson

func CreateContainerResponseFromJson(bytes []byte, entity *CreateContainerResponse) error

Types

type Address

type Address struct {
	HostIp   string
	HostPort string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(socketPath string) *Client

func (*Client) CreateContainer

func (c *Client) CreateContainer(req CreateContainerRequest) (CreateContainerResponse, error)

CreateContainer will create a container

func (*Client) InspectContainer

func (c *Client) InspectContainer(id string) (Container, error)

InspectContainer will get details about a running container

func (*Client) RemoveContainer

func (c *Client) RemoveContainer(id string) error

func (*Client) StartContainer

func (c *Client) StartContainer(id string, req StartContainerRequest) error

StartContainer will start up a previously created container

func (*Client) StopContainer

func (c *Client) StopContainer(id string, timeout int) error

type Container

type Container struct {
	ID              string
	Created         string
	Path            string
	Args            []string
	Name            string
	Image           string
	NetworkSettings NetworkSettings
	Volumes         map[string]string
}

type ContainerHostPort

type ContainerHostPort struct {
	HostPort string
}

type CreateContainerRequest

type CreateContainerRequest struct {
	Image string
}

type CreateContainerResponse

type CreateContainerResponse struct {
	Id       string
	Warnings []string
}

type NetworkSettings

type NetworkSettings struct {
	IPAddress string
	Gateway   string
	Ports     map[string][]Address
}

type StartContainerRequest

type StartContainerRequest struct {
	PortBindings map[string][]ContainerHostPort
}

Jump to

Keyboard shortcuts

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