runtime

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultNamespace is the containerd namespace for Warren
	DefaultNamespace = "warren"

	// DefaultSocketPath is the default containerd socket
	DefaultSocketPath = "/run/containerd/containerd.sock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerdRuntime

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

ContainerdRuntime implements container runtime using containerd

func NewContainerdRuntime

func NewContainerdRuntime(socketPath string) (*ContainerdRuntime, error)

NewContainerdRuntime creates a new containerd runtime client

func (*ContainerdRuntime) Close

func (r *ContainerdRuntime) Close() error

Close closes the containerd client connection

func (*ContainerdRuntime) CreateContainer

func (r *ContainerdRuntime) CreateContainer(ctx context.Context, task *types.Task) (string, error)

CreateContainer creates a container from a task specification

func (*ContainerdRuntime) CreateContainerWithMounts

func (r *ContainerdRuntime) CreateContainerWithMounts(ctx context.Context, task *types.Task, secretsPath string, volumeMounts []specs.Mount, resolvConfPath string) (string, error)

CreateContainerWithMounts creates a container with secret and volume mounts

func (*ContainerdRuntime) CreateContainerWithSecrets

func (r *ContainerdRuntime) CreateContainerWithSecrets(ctx context.Context, task *types.Task, secretsPath string) (string, error)

CreateContainerWithSecrets creates a container with secret tmpfs mounts (deprecated, use CreateContainerWithMounts)

func (*ContainerdRuntime) DeleteContainer

func (r *ContainerdRuntime) DeleteContainer(ctx context.Context, containerID string) error

DeleteContainer removes a container and its snapshot

func (*ContainerdRuntime) GetContainerIP

func (r *ContainerdRuntime) GetContainerIP(ctx context.Context, containerID string) (string, error)

GetContainerIP returns the IP address of a container

func (*ContainerdRuntime) GetContainerLogs

func (r *ContainerdRuntime) GetContainerLogs(ctx context.Context, containerID string) (io.ReadCloser, error)

GetContainerLogs streams container logs (simplified implementation)

func (*ContainerdRuntime) GetContainerStatus

func (r *ContainerdRuntime) GetContainerStatus(ctx context.Context, containerID string) (types.TaskState, error)

GetContainerStatus returns the status of a container

func (*ContainerdRuntime) IsRunning

func (r *ContainerdRuntime) IsRunning(ctx context.Context, containerID string) bool

IsRunning checks if a container is currently running

func (*ContainerdRuntime) ListContainers

func (r *ContainerdRuntime) ListContainers(ctx context.Context) ([]string, error)

ListContainers returns all containers in the Warren namespace

func (*ContainerdRuntime) PullImage

func (r *ContainerdRuntime) PullImage(ctx context.Context, imageRef string) error

PullImage pulls a container image from a registry

func (*ContainerdRuntime) StartContainer

func (r *ContainerdRuntime) StartContainer(ctx context.Context, containerID string) error

StartContainer starts a container and returns its runtime ID

func (*ContainerdRuntime) StopContainer

func (r *ContainerdRuntime) StopContainer(ctx context.Context, containerID string, timeout time.Duration) error

StopContainer stops a running container

Jump to

Keyboard shortcuts

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