MCPcopy Index your code
hub / github.com/containerd/containerd / Tasks

Method Tasks

core/runtime/v2/task_manager.go:287–301  ·  view source on GitHub ↗

Tasks lists all tasks

(ctx context.Context, all bool)

Source from the content-addressed store, hash-verified

285
286// Tasks lists all tasks
287func (m *TaskManager) Tasks(ctx context.Context, all bool) ([]runtime.Task, error) {
288 shims, err := m.manager.shims.GetAll(ctx, all)
289 if err != nil {
290 return nil, err
291 }
292 out := make([]runtime.Task, len(shims))
293 for i := range shims {
294 newClient, err := newShimTask(shims[i])
295 if err != nil {
296 return nil, err
297 }
298 out[i] = newClient
299 }
300 return out, nil
301}
302
303// Delete deletes the task and shim instance
304func (m *TaskManager) Delete(ctx context.Context, taskID string) (*runtime.Exit, error) {

Callers

nothing calls this directly

Calls 2

newShimTaskFunction · 0.85
GetAllMethod · 0.45

Tested by

no test coverage detected