package v2

import "github.com/containerd/containerd/runtime/v2"

Index

Types

type Bundle

type Bundle struct {
	// ID of the bundle
	ID string
	// Path to the bundle
	Path string
	// Namespace of the bundle
	Namespace string
}

Bundle represents an OCI bundle

func LoadBundle

func LoadBundle(ctx context.Context, root, id string) (*Bundle, error)

LoadBundle loads an existing bundle from disk

func NewBundle

func NewBundle(ctx context.Context, root, state, id string, spec []byte) (b *Bundle, err error)

NewBundle returns a new bundle on disk

func (*Bundle) Delete

func (b *Bundle) Delete() error

Delete a bundle atomically

type TaskManager

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

TaskManager manages v2 shim's and their tasks

func New

func New(ctx context.Context, root, state, containerdAddress string, events *exchange.Exchange, db *metadata.DB) (*TaskManager, error)

New task manager for v2 shims

func (*TaskManager) Create

func (m *TaskManager) Create(ctx context.Context, id string, opts runtime.CreateOpts) (_ runtime.Task, err error)

Create a new task

func (*TaskManager) Get

func (m *TaskManager) Get(ctx context.Context, id string) (runtime.Task, error)

Get a specific task

func (*TaskManager) ID

func (m *TaskManager) ID() string

ID of the task manager

func (*TaskManager) Tasks

func (m *TaskManager) Tasks(ctx context.Context, all bool) ([]runtime.Task, error)

Tasks lists all tasks

Source Files

binary.go bundle.go manager.go manager_unix.go process.go shim.go shim_unix.go

Directories

PathSynopsis
runtime/v2/runc
runtime/v2/runc/optionsPackage options is a generated protocol buffer package.
runtime/v2/shim
runtime/v2/taskPackage task is a generated protocol buffer package.
Version
v1.2.1
Published
Dec 5, 2018
Platform
js/wasm
Imports
34 packages
Last checked
49 seconds ago

Tools for package owners.