Tasks lists all tasks
(ctx context.Context, all bool)
| 285 | |
| 286 | // Tasks lists all tasks |
| 287 | func (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 |
| 304 | func (m *TaskManager) Delete(ctx context.Context, taskID string) (*runtime.Exit, error) { |
nothing calls this directly
no test coverage detected