client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 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() ([]types.Container, error)

func (Docker) Close added in v0.0.8

func (d Docker) Close() error

func (Docker) ContainerLogs

func (d Docker) ContainerLogs(id string) (string, error)

func (Docker) Exec added in v0.0.16

func (d Docker) Exec(containerId string, cmd []string, detach bool) error

func (Docker) FindContainers added in v0.0.16

func (d Docker) FindContainers(keyValuePairs ...filters.KeyValuePair) ([]types.Container, error)

func (Docker) RemoveContainer

func (d Docker) RemoveContainer(id string) error

func (Docker) RunContainer

func (d Docker) RunContainer(image string, cmd []string, env []string, volumes []string, labels map[string]string) (string, error)

func (Docker) StartContainer

func (d Docker) StartContainer(id string) error

func (Docker) StopContainer

func (d Docker) StopContainer(id string) error

func (Docker) WaitForContainer

func (d Docker) WaitForContainer(ctx contexts.Context, id string) error

type DockerClient added in v0.0.8

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

func Client

func Client(socket string) (DockerClient, error)

Jump to

Keyboard shortcuts

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