Documentation
¶
Overview ¶
Package swarming implements a client for creating skylab-swarming tasks and getting their results.
Index ¶
- func TaskListURLForTags(swarmingService string, tags []string) string
- type Client
- func (c *Client) BotExists(ctx context.Context, dims []*swarming_api.SwarmingRpcsStringPair) (bool, error)
- func (c *Client) CancelTask(ctx context.Context, taskID string) error
- func (c *Client) DutNameToBotID(ctx context.Context, host string) (string, error)
- func (c *Client) GetActiveLeaseTasksForBoard(ctx context.Context, board string) ([]*swarming_api.SwarmingRpcsTaskResult, error)
- func (c *Client) GetActiveLeaseTasksForModel(ctx context.Context, model string) ([]*swarming_api.SwarmingRpcsTaskResult, error)
- func (c *Client) GetBots(ctx context.Context, dims []*swarming_api.SwarmingRpcsStringPair) ([]*swarming_api.SwarmingRpcsBotInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TaskListURLForTags ¶
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 NewClientUpdated ¶
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 ¶
CancelTask cancels a swarming task by taskID, retrying transient errors.
func (*Client) DutNameToBotID ¶
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 ¶
func (c *Client) GetBots(ctx context.Context, dims []*swarming_api.SwarmingRpcsStringPair) ([]*swarming_api.SwarmingRpcsBotInfo, error)
GetBots returns a slice of bots