package v2
import "github.com/containerd/containerd/runtime/v2"
Index ¶
- type Bundle
- func LoadBundle(ctx context.Context, root, id string) (*Bundle, error)
- func NewBundle(ctx context.Context, root, state, id string, spec []byte) (b *Bundle, err error)
- func (b *Bundle) Delete() error
- type Config
- type ManagerConfig
- type ShimManager
- func NewShimManager(ctx context.Context, config *ManagerConfig) (*ShimManager, error)
- func (m *ShimManager) Delete(ctx context.Context, id string) error
- func (m *ShimManager) Get(ctx context.Context, id string) (ShimProcess, error)
- func (m *ShimManager) ID() string
- func (m *ShimManager) Start(ctx context.Context, id string, opts runtime.CreateOpts) (_ ShimProcess, retErr error)
- type ShimProcess
- type TaskManager
- func NewTaskManager(shims *ShimManager) *TaskManager
- func (m *TaskManager) Create(ctx context.Context, taskID string, opts runtime.CreateOpts) (runtime.Task, error)
- func (m *TaskManager) Delete(ctx context.Context, taskID string) (*runtime.Exit, error)
- func (m *TaskManager) Get(ctx context.Context, id string) (runtime.Task, error)
- func (m *TaskManager) ID() string
- func (m *TaskManager) Tasks(ctx context.Context, all bool) ([]runtime.Task, error)
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 ¶
LoadBundle loads an existing bundle from disk
func NewBundle ¶
NewBundle returns a new bundle on disk
func (*Bundle) Delete ¶
Delete a bundle atomically
type Config ¶
type Config struct { // Supported platforms Platforms []string `toml:"platforms"` // SchedCore enabled linux core scheduling SchedCore bool `toml:"sched_core"` }
Config for the v2 runtime
type ManagerConfig ¶
type ManagerConfig struct { Root string State string Store containers.Store Events *exchange.Exchange Address string TTRPCAddress string SchedCore bool }
type ShimManager ¶
type ShimManager struct {
// contains filtered or unexported fields
}
ShimManager manages currently running shim processes. It is mainly responsible for launching new shims and for proper shutdown and cleanup of existing instances. The manager is unaware of the underlying services shim provides and lets higher level services consume them, but don't care about lifecycle management.
func NewShimManager ¶
func NewShimManager(ctx context.Context, config *ManagerConfig) (*ShimManager, error)
NewShimManager creates a manager for v2 shims
func (*ShimManager) Delete ¶
func (m *ShimManager) Delete(ctx context.Context, id string) error
Delete a runtime task
func (*ShimManager) Get ¶
func (m *ShimManager) Get(ctx context.Context, id string) (ShimProcess, error)
func (*ShimManager) ID ¶
func (m *ShimManager) ID() string
ID of the shim manager
func (*ShimManager) Start ¶
func (m *ShimManager) Start(ctx context.Context, id string, opts runtime.CreateOpts) (_ ShimProcess, retErr error)
Start launches a new shim instance
type ShimProcess ¶
type ShimProcess interface { runtime.Process // ID of the shim. ID() string // Namespace of this shim. Namespace() string }
ShimProcess represents a shim instance managed by the shim service.
type TaskManager ¶
type TaskManager struct {
// contains filtered or unexported fields
}
TaskManager wraps task service client on top of shim manager.
func NewTaskManager ¶
func NewTaskManager(shims *ShimManager) *TaskManager
NewTaskManager creates a new task manager instance.
func (*TaskManager) Create ¶
func (m *TaskManager) Create(ctx context.Context, taskID string, opts runtime.CreateOpts) (runtime.Task, error)
Create launches new shim instance and creates new task
func (*TaskManager) Delete ¶
Delete deletes the task and shim instance
func (*TaskManager) Get ¶
Get a specific task
func (*TaskManager) ID ¶
func (m *TaskManager) ID() string
ID of the task manager
func (*TaskManager) Tasks ¶
Tasks lists all tasks
Source Files ¶
binary.go bundle.go bundle_default.go manager.go manager_unix.go process.go shim.go shim_load.go shim_unix.go
Directories ¶
Path | Synopsis |
---|---|
runtime/v2/logging | |
runtime/v2/runc | |
runtime/v2/runc/options | |
runtime/v2/shim | |
runtime/v2/task |
- Version
- v1.6.37
- Published
- Feb 27, 2025
- Platform
- js/wasm
- Imports
- 38 packages
- Last checked
- 1 minute ago –
Tools for package owners.