Documentation ¶
Index ¶
- Constants
- func CreateContainerResponseFromJson(bytes []byte, entity *CreateContainerResponse) error
- type Address
- type Client
- func (c *Client) CreateContainer(req CreateContainerRequest) (CreateContainerResponse, error)
- func (c *Client) InspectContainer(id string) (Container, error)
- func (c *Client) RemoveContainer(id string) error
- func (c *Client) StartContainer(id string, req StartContainerRequest) error
- func (c *Client) StopContainer(id string, timeout int) error
- type Container
- type ContainerHostPort
- type CreateContainerRequest
- type CreateContainerResponse
- type NetworkSettings
- type StartContainerRequest
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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateContainer ¶
func (c *Client) CreateContainer(req CreateContainerRequest) (CreateContainerResponse, error)
CreateContainer will create a container
func (*Client) InspectContainer ¶
InspectContainer will get details about a running container
func (*Client) RemoveContainer ¶
func (*Client) StartContainer ¶
func (c *Client) StartContainer(id string, req StartContainerRequest) error
StartContainer will start up a previously created container
type ContainerHostPort ¶
type ContainerHostPort struct {
HostPort string
}
type CreateContainerRequest ¶
type CreateContainerRequest struct {
Image string
}
type CreateContainerResponse ¶
type NetworkSettings ¶
type StartContainerRequest ¶
type StartContainerRequest struct {
PortBindings map[string][]ContainerHostPort
}
Click to show internal directories.
Click to hide internal directories.