engine

package
v0.0.0-...-e933087 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(endpoint, certPath string)

Configure set client's configuration to current

func Save

func Save()

Save persists current configuration

Types

type CannotXContainerError

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

CannotXContainerError occers wher the request went wrong

func (CannotXContainerError) Error

func (err CannotXContainerError) Error() string

func (CannotXContainerError) ErrorName

func (err CannotXContainerError) ErrorName() string

ErrorName returns the error name

type Client

type Client struct {
	*api.Client
	Conf *models.DockerClient
}

Client represents wrapped api.Client

func Docker

func Docker() (client *Client, err error)

Docker generates a docker client

func (*Client) Changes

func (c *Client) Changes(id string) []api.Change

Changes returns containers changed files

func (*Client) Commit

func (c *Client) Commit(id, repository, tag, message, author string) ImageMetadata

Commit commit docker containers more safely

func (*Client) Create

func (c *Client) Create(name string, config *api.Config, host *api.HostConfig) ContainerMetadata

Create creates docker containers more safely

func (*Client) History

func (c *Client) History(id string) []api.ImageHistory

History returns its history

func (*Client) InspectContainer

func (c *Client) InspectContainer(id string) ContainerMetadata

InspectContainer inspects the docker container

func (*Client) InspectImage

func (c *Client) InspectImage(id string) ImageMetadata

InspectImage inspects the docker image

func (*Client) Kill

func (c *Client) Kill(id string, wait uint) ContainerMetadata

Kill kills docker containers more safely

func (*Client) ListImages

func (c *Client) ListImages() []api.APIImages

ListImages list docker images

func (*Client) LogStream

func (c *Client) LogStream(opts LogsOptions) (err error)

LogStream returns containers logs as streams

func (*Client) Logs

func (c *Client) Logs(id string, line int, timeout time.Duration) (stdout []string, stderr []string, err error)

Logs returns containers logs

func (*Client) Pull

func (c *Client) Pull(image string) ImageMetadata

Pull pulls docker images more safely

func (*Client) Rename

func (c *Client) Rename(id, name string) error

Rename renames the container

func (*Client) Restart

func (c *Client) Restart(id string, wait uint) ContainerMetadata

Restart restarts docker containers more safely

func (*Client) Rm

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

Rm removes docker containers more safely

func (*Client) Rmi

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

Rmi removes docker images more safely

func (*Client) Start

func (c *Client) Start(id string) ContainerMetadata

Start starts docker containers more safely

func (*Client) Stats

func (c *Client) Stats(id string, count int) (result []*api.Stats, err error)

Stats returns container statistics

func (*Client) Stop

func (c *Client) Stop(id string) ContainerMetadata

Stop stops docker containers more safely

func (*Client) Tag

func (c *Client) Tag(id, repository, tag string) error

Tag tags docker images more safely

func (*Client) Top

func (c *Client) Top(id, args string) api.TopResult

Top returns processes

type ContainerMetadata

type ContainerMetadata struct {
	Container *api.Container
	Error     error
}

ContainerMetadata represents docker response

type DockerTimeoutError

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

DockerTimeoutError occers when the request was timeout

func (*DockerTimeoutError) Error

func (err *DockerTimeoutError) Error() string

func (*DockerTimeoutError) ErrorName

func (err *DockerTimeoutError) ErrorName() string

ErrorName returns the error name

type ImageMetadata

type ImageMetadata struct {
	Image *api.Image
	Error error
}

ImageMetadata represents docker response

type LogsOptions

type LogsOptions struct {
	ID      string
	Tail    int64
	Stdout  chan<- string
	Stderr  chan<- string
	Done    <-chan bool
	Timeout time.Duration
}

LogsOptions can be

Jump to

Keyboard shortcuts

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