libtc

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const CONTAINERS_ROOT = "/run/taskc"

Variables

Functions

func Create added in v0.2.3

func Create(cfg CreateConfig) (container *libcontainer.Container, err error)

func DefaultRuntimeSpec

func DefaultRuntimeSpec() (s *specs.Spec)

These default spec settings are modified from https://github.com/containerd/containerd/tree/main/pkg/oci

func GetStatusState added in v0.2.3

func GetStatusState(id string) (status libcontainer.Status, state *libcontainer.State, err error)

func ListContainers added in v0.2.3

func ListContainers() ([]containerState, error)

func Remove added in v0.2.3

func Remove(id string) (err error)

func Run added in v0.2.3

func Run(container *libcontainer.Container, cfg RunConfig, ctx context.Context) (err error)

func SetupIO

func SetupIO(process *libcontainer.Process) (*tty, error)

func Stop added in v0.2.3

func Stop(id string, timeout int64) (err error)

func Update added in v0.2.3

func Update(id string, cfg UpdateConfig) (err error)

Types

type CreateConfig added in v0.2.3

type CreateConfig struct {
	ContainerId    string
	RootFs         string
	GPUEnabled     bool
	PortMapping    string
	CPULimit       string
	MemoryLimit    string
	NameSpacePaths map[configs.NamespaceType]string
}

type RunConfig added in v0.2.3

type RunConfig struct {
	ImageConfig imgSpec.ImageConfig
	Interactive bool
	Input       io.Reader
	Output      io.Writer
}

type UpdateConfig added in v0.2.3

type UpdateConfig struct {
	CPULimit    string
	MemoryLimit string
}

Jump to

Keyboard shortcuts

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