Documentation
¶
Overview ¶
Package containerd provides a backend that executes code via containerd. Similar to Docker but more infrastructure-native for servers/agents already using containerd.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrContainerdNotAvailable is returned when containerd is not available. ErrContainerdNotAvailable = errors.New("containerd not available") // ErrImageNotFound is returned when the execution image is not found. ErrImageNotFound = errors.New("image not found") // ErrContainerFailed is returned when container creation/execution fails. ErrContainerFailed = errors.New("container execution failed") )
Errors for containerd backend operations.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend executes code via containerd with security isolation.
func (*Backend) Execute ¶
func (b *Backend) Execute(ctx context.Context, req runtime.ExecuteRequest) (runtime.ExecuteResult, error)
Execute runs code via containerd with security isolation.
func (*Backend) Kind ¶
func (b *Backend) Kind() runtime.BackendKind
Kind returns the backend kind identifier.
type Config ¶
type Config struct {
// ImageRef is the image reference to use for execution.
// Default: toolruntime-sandbox:latest
ImageRef string
// Namespace is the containerd namespace to use.
// Default: default
Namespace string
// SocketPath is the path to the containerd socket.
// Default: /run/containerd/containerd.sock
SocketPath string
// Logger is an optional logger for backend events.
Logger Logger
}
Config configures a containerd backend.
Click to show internal directories.
Click to hide internal directories.