utils

package
Version: v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSwarmingTaskErr

func IsSwarmingTaskErr(e error) bool

IsSwarmingTaskErr returns true if the given error is because of a swarming task failure

Types

type TaskCreator

type TaskCreator struct {
	Client      *swarming.Client
	Environment site.Environment
	// contains filtered or unexported fields
}

TaskCreator creates Swarming tasks

func NewTaskCreator

func NewTaskCreator(ctx context.Context, authFlags *authcli.Flags, envFlags skycmdlib.EnvFlags) (*TaskCreator, error)

NewTaskCreator creates and initialize the TaskCreator.

func (*TaskCreator) DeployTask

func (tc *TaskCreator) DeployTask(ctx context.Context, dutID, actions string) (taskID string, err error)

DeployTask creates deploy task for a particular DUT

The deployment task's parameters are hardcoded by the system instead of users now. TODO: Call DeployTask in add-dut and update-dut directly instead of calling crosskylabadmin.

type TaskInfo

type TaskInfo struct {
	// ID of the created task in the Swarming.
	ID string
	// TaskURL provides the URL to the created task in Swarming.
	TaskURL string
}

TaskInfo contains information of the created task.

Source Files

Jump to

Keyboard shortcuts

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