Documentation
¶
Index ¶
- type ContainerConfig
- type DockerRuntime
- func (d *DockerRuntime) GetImageVersion(ctx context.Context, imageName string) (string, error)
- 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) Remove(ctx context.Context, containerName string) error
- func (d *DockerRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
- func (d *DockerRuntime) Stop(ctx context.Context, containerName string) error
- func (d *DockerRuntime) StreamLogs(ctx context.Context, containerID string, out io.Writer) 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) GetImageVersion ¶
func (*DockerRuntime) PullImage ¶
func (d *DockerRuntime) PullImage(ctx context.Context, imageName string, progress chan<- PullProgress) error
func (*DockerRuntime) Remove ¶
func (d *DockerRuntime) Remove(ctx context.Context, containerName string) error
func (*DockerRuntime) Start ¶
func (d *DockerRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
func (*DockerRuntime) Stop ¶
func (d *DockerRuntime) Stop(ctx context.Context, containerName string) error
func (*DockerRuntime) StreamLogs ¶
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)
Stop(ctx context.Context, containerName string) error
Remove(ctx context.Context, containerName string) error
IsRunning(ctx context.Context, containerID string) (bool, error)
Logs(ctx context.Context, containerID string, tail int) (string, error)
StreamLogs(ctx context.Context, containerID string, out io.Writer) error
GetImageVersion(ctx context.Context, imageName string) (string, error)
}
Runtime abstracts container runtime operations (Docker, Podman, Kubernetes, etc.)
Click to show internal directories.
Click to hide internal directories.