docker

package
v0.0.0-...-ebbaa34 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsContainerNotFoundError

func IsContainerNotFoundError(err error) bool

IsContainerNotFoundError checks whether the error is container not found error.

func IsImageNotFoundError

func IsImageNotFoundError(err error) bool

IsImageNotFoundError checks whether the error is image not found error. This is exposed to share with dockershim.

Types

type ContainerClient

type ContainerClient interface {
	ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error)
	InspectContainer(id string) (*dockertypes.ContainerJSON, error)
	InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error)
	CreateContainer(dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error)
	StartContainer(id string) error
	StopContainer(id string, timeout time.Duration) error
	UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error
	RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error
	ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error)
	RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error)
	ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error)
	Logs(string, dockertypes.ContainerLogsOptions, StreamOptions) error
	Version() (*dockertypes.Version, error)
	Info() (*dockertypes.Info, error)
	CreateExec(string, dockertypes.ExecConfig) (*dockertypes.IDResponse, error)
	StartExec(string, dockertypes.ExecStartCheck, StreamOptions) error
	InspectExec(id string) (*dockertypes.ContainerExecInspect, error)
	AttachToContainer(string, dockertypes.ContainerAttachOptions, StreamOptions) error
	ResizeContainerTTY(id string, height, width uint) error
	ResizeExecTTY(id string, height, width uint) error
	GetContainerStats(id string) (*dockertypes.StatsJSON, error)
}

func KubeDockerClient

func KubeDockerClient(dockerClient *dockerapi.Client, requestTimeout time.Duration) ContainerClient

type ImageNotFoundError

type ImageNotFoundError struct {
	ID string
}

ImageNotFoundError is the error returned by InspectImage when image not found. Expose this to inject error in dockershim for testing.

func (ImageNotFoundError) Error

func (e ImageNotFoundError) Error() string

type StreamOptions

type StreamOptions struct {
	RawTerminal  bool
	InputStream  io.Reader
	OutputStream io.Writer
	ErrorStream  io.Writer
	ExecStarted  chan struct{}
}

StreamOptions are the options used to configure the stream redirection

Jump to

Keyboard shortcuts

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