containerdbackend

package
v0.0.0-...-0205864 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOperationTimeout = 10 * time.Second
	DefaultCleanupTimeout   = 30 * time.Second
	MaxOperationTimeout     = time.Minute
	MaxCleanupTimeout       = 5 * time.Minute
	MaxInputBytesHard       = 16 << 20
	MaxOutputBytesHard      = 16 << 20
	MaxArgumentsHard        = 64
	MaxEnvironmentHard      = 64
	MaxStringBytesHard      = 4096
	MaxMemoryBytesHard      = uint64(1 << 40)
	MaxDiskBytesHard        = uint64(16 << 40)
	MaxPIDsHard             = uint32(1 << 20)
	MaxExecutionTimeHard    = time.Hour
	MaxCPUMillisHard        = uint64(24 * time.Hour / time.Millisecond)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend is a bounded lifecycle boundary around one private containerd namespace. It owns no queue and starts no goroutine of its own.

func Open

func Open(ctx context.Context, config Config) (*Backend, error)

func (*Backend) CheckReady

func (b *Backend) CheckReady(ctx context.Context) error

func (*Backend) Close

func (b *Backend) Close() error

func (*Backend) RunIsolated

func (b *Backend) RunIsolated(
	ctx context.Context,
	request executor.ContainerRequest,
	input []byte,
) (executor.Result, error)

func (*Backend) RunIsolatedOnDevices

func (b *Backend) RunIsolatedOnDevices(
	ctx context.Context,
	request executor.ContainerRequest,
	input []byte,
	aliases []string,
) (executor.Result, error)

RunIsolatedOnDevices is the narrow operator-alias to CDI boundary used by gpuisolation. It accepts only aliases fixed when the backend was opened and never treats a remote request value as a CDI identifier.

type Config

type Config struct {
	SocketPath       string
	Namespace        string
	Snapshotter      string
	Runtime          string
	FIFODir          string
	MaxActive        int
	OperationTimeout time.Duration
	CleanupTimeout   time.Duration
	PermitGPU        bool
	PermitNetwork    bool
	GPUDevices       map[string]string
	CDISpecDirs      []string
	PolicyLimits     executor.Limits
	ImageReference   string
	ImageDigest      string
	ImagePlatform    string
}

Jump to

Keyboard shortcuts

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