api

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConnectionRefused = errors.New("Cannot connect to the Hyper daemon. Is 'hyperd' running on this host?")
)

Functions

This section is empty.

Types

type APIInterface

type APIInterface interface {
	Login(auth dockertypes.AuthConfig, response *dockertypes.AuthResponse) (remove bool, err error)

	Attach(container, termTag string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error
	Exec(container, tag string, command []byte, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error
	WinResize(id, tag string, height, width int) error

	List(item, pod, vm string, aux bool) (*engine.Env, error)
	GetContainerInfo(container string) (*types.ContainerInfo, error)
	GetContainerByPod(podId string) (string, error)
	GetExitCode(container, tag string) error
	ContainerLogs(container, since string, timestamp, follow bool, tail string) (io.ReadCloser, string, error)
	KillContainer(container string, sig int) error

	GetPodInfo(podName string) (*types.PodInfo, error)
	CreatePod(spec interface{}) (string, int, error)
	StartPod(podId, vmId, tag string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) (string, error)
	StopPod(podId, stopVm string) (int, string, error)
	RmPod(id string) error
	PausePod(podId string) error
	UnpausePod(podId string) error
	KillPod(pod string, sig int) error

	Build(name string, hasBody bool, body io.Reader) (io.ReadCloser, string, error)
	Commit(container, repo, author, message string, changes []string, pause bool) (string, error)
	Load(body io.Reader) (io.ReadCloser, string, error)
	GetImages(all, quiet bool) (*engine.Env, error)
	RemoveImage(image string, noprune, force bool) (*engine.Env, error)
	Pull(image string, authConfig dockertypes.AuthConfig) (io.ReadCloser, string, int, error)
	Push(tag, repo string, authConfig dockertypes.AuthConfig) (io.ReadCloser, string, int, error)

	CreateVm(cpu, mem int, async bool) (id string, err error)
	RmVm(vm string) (err error)

	Info() (*engine.Env, error)
}

type Client

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

func NewClient

func NewClient(proto, addr string, tlsConfig *tls.Config) *Client

func (*Client) Attach

func (cli *Client) Attach(container, termTag string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error

func (*Client) AuthHeader

func (cli *Client) AuthHeader(orig map[string][]string, auth types.AuthConfig) (map[string][]string, error)

func (*Client) Build

func (cli *Client) Build(name string, hasBody bool, body io.Reader) (io.ReadCloser, string, error)

func (*Client) Commit

func (cli *Client) Commit(container, repo, author, message string, changes []string, pause bool) (string, error)

func (*Client) ContainerLogs

func (cli *Client) ContainerLogs(container, since string, timestamp, follow bool, tail string) (io.ReadCloser, string, error)

func (*Client) CreatePod

func (cli *Client) CreatePod(spec interface{}) (string, int, error)

func (*Client) CreateVm

func (cli *Client) CreateVm(cpu, mem int, async bool) (id string, err error)

func (*Client) Exec

func (cli *Client) Exec(container, tag string, command []byte, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error

func (*Client) GetContainerByPod

func (cli *Client) GetContainerByPod(podId string) (string, error)

func (*Client) GetContainerInfo

func (cli *Client) GetContainerInfo(container string) (*types.ContainerInfo, error)

func (*Client) GetExitCode

func (cli *Client) GetExitCode(container, tag string) error

func (*Client) GetImages

func (cli *Client) GetImages(all, quiet bool) (*engine.Env, error)

func (*Client) GetPodInfo

func (cli *Client) GetPodInfo(podName string) (*types.PodInfo, error)

func (*Client) HTTPClient

func (cli *Client) HTTPClient() *http.Client

func (*Client) Info

func (cli *Client) Info() (*engine.Env, error)

func (*Client) KillContainer

func (cli *Client) KillContainer(container string, sig int) error

func (*Client) KillPod

func (cli *Client) KillPod(pod string, sig int) error

func (*Client) List

func (cli *Client) List(item, pod, vm string, aux bool) (*engine.Env, error)

func (*Client) Load

func (cli *Client) Load(body io.Reader) (io.ReadCloser, string, error)

func (*Client) Login

func (cli *Client) Login(auth types.AuthConfig, response *types.AuthResponse) (remove bool, err error)

func (*Client) PausePod

func (cli *Client) PausePod(podId string) error

func (*Client) Pull

func (cli *Client) Pull(image string, authConfig types.AuthConfig) (io.ReadCloser, string, int, error)

func (*Client) Push

func (cli *Client) Push(tag, repo string, authConfig types.AuthConfig) (io.ReadCloser, string, int, error)

func (*Client) RemoveImage

func (cli *Client) RemoveImage(image string, noprune, force bool) (*engine.Env, error)

func (*Client) RmPod

func (cli *Client) RmPod(id string) error

func (*Client) RmVm

func (cli *Client) RmVm(vm string) (err error)

func (*Client) StartPod

func (cli *Client) StartPod(podId, vmId, tag string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) (string, error)

func (*Client) StopPod

func (cli *Client) StopPod(podId, stopVm string) (int, string, error)

func (*Client) UnpausePod

func (cli *Client) UnpausePod(podId string) error

func (*Client) WinResize

func (cli *Client) WinResize(id, tag string, height, width int) error

type StatusError

type StatusError struct {
	Status     string
	StatusCode int
}

An StatusError reports an unsuccessful exit by a command.

func (StatusError) Error

func (e StatusError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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