swarming

package
v0.0.0-...-c1f61f0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package swarming implements a client for creating skylab-swarming tasks and getting their results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TaskListURLForTags

func TaskListURLForTags(swarmingService string, tags []string) string

TaskListURLForTags returns a tasklist URL filtered by the given tags.

Types

type Client

type Client struct {
	SwarmingService *swarming_api.Service
	// contains filtered or unexported fields
}

Client is a swarming client for creating tasks and waiting for their results.

func NewClient

func NewClient(h *http.Client, server string) (*Client, error)

[DEPRECATED] NewClient creates a new Client.

func NewClientUpdated

func NewClientUpdated(ctx context.Context, h *http.Client, server string) (*Client, error)

NewClientUpdated creates a new Client.

func (*Client) BotExists

func (c *Client) BotExists(ctx context.Context, dims []*swarming_api.SwarmingRpcsStringPair) (bool, error)

BotExists checks if an bot exists with the given dimensions.

func (*Client) CancelTask

func (c *Client) CancelTask(ctx context.Context, taskID string) error

CancelTask cancels a swarming task by taskID, retrying transient errors.

func (*Client) DutNameToBotID

func (c *Client) DutNameToBotID(ctx context.Context, host string) (string, error)

DutNameToBotID gets the bot id associated with a particular dut by its hostname.

func (*Client) GetActiveLeaseTasksForBoard

func (c *Client) GetActiveLeaseTasksForBoard(ctx context.Context, board string) ([]*swarming_api.SwarmingRpcsTaskResult, error)

GetActiveLeaseTasksForBoard gets active leases *specifically* targeted to a board.

func (*Client) GetActiveLeaseTasksForModel

func (c *Client) GetActiveLeaseTasksForModel(ctx context.Context, model string) ([]*swarming_api.SwarmingRpcsTaskResult, error)

GetActiveLeaseTasksForModel gets active leases *specifically* targeted to a model. Leases that apply to a specific hostname are not counted here. TODO(gregorynisbet): Count leases that target specific hostnames as well.

func (*Client) GetBots

GetBots returns a slice of bots

Jump to

Keyboard shortcuts

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