docker

package
v0.0.0-...-c9337a5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorConnectionFailed

func ErrorConnectionFailed(host string) error

ErrorConnectionFailed returns an error with host in the error message when connection to docker daemon failed.

func ParseHostURL

func ParseHostURL(host string) (*url.URL, error)

ParseHostURL parses a url string, validates the string is a host url, and returns the parsed URL

Types

type Client

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

Client is the API client that performs all operations against a docker server.

func NewClient

func NewClient(host string, version string, client *http.Client) (*Client, error)

NewClient initializes a new API client for the given host and API version.

func (*Client) ExecCreate

func (cli *Client) ExecCreate(container string, cmd string) (string, error)

ExecCreate creates a new exec configuration to run an exec process.

func (*Client) ExecResize

func (cli *Client) ExecResize(execID string, width int, height int) error

ExecResize changes the size of the tty for an exec process running inside a container.

func (*Client) ExecStart

func (cli *Client) ExecStart(execID string, input chan []byte) (chan []byte, error)

ExecStart starts an exec process already created in the docker host and returns a channel to communicate with the process.

type ExecConfig

type ExecConfig struct {
	User         string
	Privileged   bool
	Tty          bool
	AttachStdin  bool
	AttachStderr bool
	AttachStdout bool
	Detach       bool
	DetachKeys   string
	Env          []string
	Cmd          []string
}

ExecConfig isi the Config struct that holds the configuration for the exec feature of docker.

type ExecResponse

type ExecResponse struct {
	ID string
}

ExecResponse represents response of exec api.

Jump to

Keyboard shortcuts

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