container

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2025 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerConfig

type ContainerConfig struct {
	Image string
	Cmd   []string
	Tty   bool
}

type DockerManager

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

func NewDockerManager

func NewDockerManager() (*DockerManager, error)

func (*DockerManager) Create

func (dm *DockerManager) Create(config ContainerConfig) (string, error)

func (*DockerManager) GetLogs

func (dm *DockerManager) GetLogs(containerID string) (string, error)

func (*DockerManager) IsRunning added in v0.5.1

func (dm *DockerManager) IsRunning(containerID string) (bool, error)

func (*DockerManager) Remove

func (dm *DockerManager) Remove(containerID string) error

func (*DockerManager) Start

func (dm *DockerManager) Start(containerID string) error

func (*DockerManager) Stop

func (dm *DockerManager) Stop(containerID string, timeout int) error

func (*DockerManager) Wait added in v0.4.0

func (dm *DockerManager) Wait(containerID string) (container.WaitResponse, error)

type Manager

type Manager interface {
	Create(config ContainerConfig) (string, error)
	Start(id string) error
	Stop(id string, timeout int) error
	Remove(id string) error
	GetLogs(id string) (string, error)
	Wait(id string) (container.WaitResponse, error)
	IsRunning(id string) (bool, error)
}

Jump to

Keyboard shortcuts

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