Documentation
¶
Index ¶
- type ContainerConfig
- type DockerRuntime
- func (d *DockerRuntime) IsRunning(ctx context.Context, containerID string) (bool, error)
- func (d *DockerRuntime) Logs(ctx context.Context, containerID string, tail int) (string, error)
- func (d *DockerRuntime) PullImage(ctx context.Context, imageName string, progress chan<- PullProgress) error
- func (d *DockerRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
- type PullProgress
- type Runtime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerConfig ¶
type DockerRuntime ¶
type DockerRuntime struct {
// contains filtered or unexported fields
}
DockerRuntime implements Runtime using the Docker API.
func NewDockerRuntime ¶
func NewDockerRuntime() (*DockerRuntime, error)
func (*DockerRuntime) PullImage ¶
func (d *DockerRuntime) PullImage(ctx context.Context, imageName string, progress chan<- PullProgress) error
func (*DockerRuntime) Start ¶
func (d *DockerRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
type PullProgress ¶
type Runtime ¶
type Runtime interface {
PullImage(ctx context.Context, image string, progress chan<- PullProgress) error
Start(ctx context.Context, config ContainerConfig) (string, error)
IsRunning(ctx context.Context, containerID string) (bool, error)
Logs(ctx context.Context, containerID string, tail int) (string, error)
}
Runtime abstracts container runtime operations (Docker, Podman, Kubernetes, etc.)
Click to show internal directories.
Click to hide internal directories.