client

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package client implements Task Execution Service API for requesting servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelTask

func CancelTask(host, id string) error

CancelTask cancels task by its ID.

func DisableNode

func DisableNode(host, id string, cancel bool) error

DisableNode disables worker node. cancel tells server to cancel running tasks in the worker node and enqueue those tasks.

func EnableNode

func EnableNode(host string, n *models.Node) (id string, err error)

EnableNode enables worker node at main server returning its ID.

func GetTask

func GetTask(host, id string, view models.View) (*models.Task, error)

GetTask retrieves task information given its ID.

func ListNodes

func ListNodes(host string, onlyActive bool) ([]*models.Node, error)

ListNodes retrieves all worker nodes.

func ListTasks

func ListTasks(host string, pageSize int, pageToken string, view models.View, nodes []string, states []models.State) (*models.ListTasksResponse, error)

ListTasks retrieves tasks from server that matches worker nodes and task states. Pagination is done via pageSize and pageToken parameters. view defines task fields to be returned.

Minimal returns only task ID and state.

Basic returns all fields except Logs.ExecutorLogs.Stdout, Logs.ExecutorLogs.Stderr, Inputs.Content and Logs.SystemLogs.

Full returns all fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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