Add variable names to runtime's interface definitions

To ease code readability

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2021-04-15 12:03:13 -07:00
parent 993b863993
commit b83d04f910
2 changed files with 22 additions and 22 deletions

View File

@@ -63,14 +63,14 @@ type PlatformRuntime interface {
// ID of the runtime
ID() string
// Create creates a task with the provided id and options.
Create(ctx context.Context, id string, opts CreateOpts) (Task, error)
Create(ctx context.Context, taskID string, opts CreateOpts) (Task, error)
// Get returns a task.
Get(context.Context, string) (Task, error)
Get(ctx context.Context, taskID string) (Task, error)
// Tasks returns all the current tasks for the runtime.
// Any container runs at most one task at a time.
Tasks(context.Context, bool) ([]Task, error)
Tasks(ctx context.Context, all bool) ([]Task, error)
// Add adds a task into runtime.
Add(context.Context, Task) error
Add(ctx context.Context, task Task) error
// Delete remove a task.
Delete(context.Context, string)
Delete(ctx context.Context, taskID string)
}