containerd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Path to the containerd binary
	BinaryPath string

	// Base directory for containerd data and configuration
	BaseDir string

	// Directory containing shim binaries (e.g. containerd-shim-runc-v2)
	BinDir string

	// Optional: custom config file path. If empty, generates default config
	ConfigPath string

	// Optional: socket path. If empty, uses default in BaseDir
	SocketPath string

	// Optional: additional environment variables
	Env []string
}

Config defines the configuration for running containerd

type ContainerdComponent

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

ContainerdComponent manages a containerd instance

func NewContainerdComponent

func NewContainerdComponent(log *slog.Logger, dataPath string) *ContainerdComponent

NewContainerdComponent creates a new containerd component

func (*ContainerdComponent) Client

func (c *ContainerdComponent) Client() (*containerd.Client, error)

Client returns the containerd client

func (*ContainerdComponent) IsRunning

func (c *ContainerdComponent) IsRunning() bool

IsRunning returns true if containerd is running

func (*ContainerdComponent) PID

func (c *ContainerdComponent) PID() (int, error)

PID returns the PID of the running containerd process

func (*ContainerdComponent) SocketPath

func (c *ContainerdComponent) SocketPath() string

SocketPath returns the path to the containerd socket

func (*ContainerdComponent) Start

func (c *ContainerdComponent) Start(ctx context.Context, config *Config) error

Start starts the containerd daemon

func (*ContainerdComponent) Stop

Stop stops the containerd daemon

Jump to

Keyboard shortcuts

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