task

package
v0.0.0-...-5db00e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(server string, ids []string, writer io.Writer) error

Cancel runs the "task cancel" CLI command, which connects to the server, calls CancelTask() on each ID, and writes output to the given writer.

func Create

func Create(server string, files []string, writer io.Writer) error

Create runs the "task create" CLI command, connecting to the server, calling CreateTask, and writing output to the given writer. Tasks are loaded from the "files" arg. "files" are file paths to JSON objects.

func Get

func Get(server string, ids []string, taskView string, w io.Writer) error

Get runs the "task get" CLI command, which connects to the server, calls GetTask for each ID, requesting the given task view, and writes output to the given writer.

func List

func List(server, taskView, pageToken string, pageSize uint32, all bool, writer io.Writer) error

List runs the "task list" CLI command, which connects to the server, calls ListTasks() and requests the given task view. Results may be filtered client-side using the "taskState" and "taskName" args. Output is written to the given writer.

func NewCommand

func NewCommand() *cobra.Command

NewCommand returns the "task" subcommands.

func Wait

func Wait(server string, ids []string) error

Wait runs the "task wait" CLI command, which polls the server, calling GetTask() for each ID, and blocking until the tasks have reached a terminal state.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL