client

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

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

func (Docker) AllContainers

func (d Docker) AllContainers(ctx context.Context) ([]types.Container, *errors.E)

func (Docker) Close added in v0.0.8

func (d Docker) Close() error

func (Docker) ContainerLogs

func (d Docker) ContainerLogs(ctx context.Context, id string) (Logs, *errors.E)

func (Docker) Exec added in v0.0.16

func (d Docker) Exec(ctx context.Context, containerId string, cmd []string, detach bool) *errors.E

func (Docker) FindContainers added in v0.0.16

func (d Docker) FindContainers(ctx context.Context, keyValuePairs ...filters.KeyValuePair) ([]types.Container, *errors.E)

func (Docker) RemoveContainer

func (d Docker) RemoveContainer(ctx context.Context, id string) *errors.E

func (Docker) RunContainer

func (d Docker) RunContainer(ctx context.Context, image string, cmd []string, env []string, volumes []string, labels map[string]string) (string, *errors.E)

func (Docker) StartContainer

func (d Docker) StartContainer(ctx context.Context, id string) *errors.E

func (Docker) StopContainer

func (d Docker) StopContainer(ctx context.Context, id string) *errors.E

func (Docker) WaitForContainer

func (d Docker) WaitForContainer(ctx context.Context, id string) *errors.E

type DockerClient added in v0.0.8

type DockerClient interface {
	Close() error
	StopContainer(ctx context.Context, id string) *errors.E
	AllContainers(ctx context.Context) ([]types.Container, *errors.E)
	FindContainers(ctx context.Context, keyValuePairs ...filters.KeyValuePair) ([]types.Container, *errors.E)
	StartContainer(ctx context.Context, id string) *errors.E
	RemoveContainer(ctx context.Context, id string) *errors.E
	ContainerLogs(ctx context.Context, id string) (Logs, *errors.E)
	RunContainer(ctx context.Context, image string, cmd []string, env []string, volumes []string, labels map[string]string) (string, *errors.E)
	WaitForContainer(ctx context.Context, id string) *errors.E
	Exec(ctx context.Context, containerId string, cmd []string, detach bool) *errors.E
}

func Client

func Client(ctx context.Context, dryRun bool, socket string) (DockerClient, *errors.E)

type Logs added in v0.1.1

type Logs struct {
	Out string
	Err string
}

Jump to

Keyboard shortcuts

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