docker

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerStatusRunning = "running"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerCreateOpts

type ContainerCreateOpts struct {
	ContainerName    string
	ContainerConfig  *container.Config
	HostConfig       *container.HostConfig
	NetworkingConfig *network.NetworkingConfig
}

type ContainerDetails added in v0.8.0

type ContainerDetails struct {
	Info    ContainerInfo
	Created time.Time
	Labels  map[string]string
	Env     []string
	Ports   []ContainerPort
	Network NetworkInfo
}

type ContainerExecOpts

type ContainerExecOpts struct {
	ContainerId             string
	Shell                   string
	InStream                io.ReadCloser
	OutStream               io.Writer
	ErrStream               io.Writer
	IsTty                   bool
	OnContainerExecCallback func()
	OnStreamCloseCallback   func()
	OnStreamErrorCallback   func(error)
}

type ContainerInfo

type ContainerInfo struct {
	ContainerId   string
	ContainerName string
	Healthy       bool
}

type ContainerLogsOpts

type ContainerLogsOpts struct {
	ContainerId           string
	OutStream             io.Writer
	ErrStream             io.Writer
	OnStreamCloseCallback func()
	OnStreamErrorCallback func(error)
}

type ContainerPort added in v0.8.0

type ContainerPort struct {
	Local  string
	Remote string
}

type ContainerRestartOpts added in v0.8.0

type ContainerRestartOpts struct {
	ContainerId       string
	OnRestartCallback func(string)
}

type DockerClient

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

func NewDockerClient

func NewDockerClient() (*DockerClient, error)

func (*DockerClient) Close

func (client *DockerClient) Close() error

func (*DockerClient) ContainerCreate

func (client *DockerClient) ContainerCreate(opts *ContainerCreateOpts) (string, error)

func (*DockerClient) ContainerExec added in v0.8.0

func (client *DockerClient) ContainerExec(opts *ContainerExecOpts) error

func (*DockerClient) ContainerInspect added in v0.8.0

func (client *DockerClient) ContainerInspect(containerId string) (ContainerDetails, error)

func (*DockerClient) ContainerList

func (client *DockerClient) ContainerList(namePrefix string, label string) ([]ContainerInfo, error)

func (*DockerClient) ContainerLogs

func (client *DockerClient) ContainerLogs(opts *ContainerLogsOpts) error

func (*DockerClient) ContainerRemove

func (client *DockerClient) ContainerRemove(containerId string) error

func (*DockerClient) ContainerRestart added in v0.8.0

func (client *DockerClient) ContainerRestart(opts *ContainerRestartOpts) error

func (*DockerClient) ImagePull

func (client *DockerClient) ImagePull(opts *ImagePullOpts) error

func (*DockerClient) ImageRemoveDangling

func (client *DockerClient) ImageRemoveDangling(opts *ImageRemoveOpts) error

func (*DockerClient) NetworkUpsert added in v0.7.0

func (client *DockerClient) NetworkUpsert(networkName string) (string, error)

type ImagePullOpts

type ImagePullOpts struct {
	ImageName           string
	OnImagePullCallback func()
}

type ImageRemoveOpts

type ImageRemoveOpts struct {
	OnImageRemoveCallback      func(imageId string)
	OnImageRemoveErrorCallback func(imageId string, err error)
}

type NetworkInfo added in v0.8.0

type NetworkInfo struct {
	Id         string
	Name       string
	IpAddress  string
	MacAddress string
}

Jump to

Keyboard shortcuts

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