runtime

package
v0.0.0-...-aed0266 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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
	Name       string
	Port       string
	HealthPath string
	Env        []string // e.g., ["KEY=value", "FOO=bar"]
}

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) IsRunning

func (d *DockerRuntime) IsRunning(ctx context.Context, containerID string) (bool, error)

func (*DockerRuntime) Logs

func (d *DockerRuntime) Logs(ctx context.Context, containerID string, tail int) (string, 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 PullProgress struct {
	LayerID string
	Status  string
	Current int64
	Total   int64
}

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.)

Jump to

Keyboard shortcuts

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