swarmclient

package
v0.0.0-...-a705825 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package swarmclient contains a LUCI swarming client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigClient

type ConfigClient struct {
	// contains filtered or unexported fields
}

ConfigClient is a client for the LUCI configuration service.

func NewConfigClient

func NewConfigClient(ctx context.Context) (*ConfigClient, error)

NewConfigClient creates a client to access the LUCI configuration service.

func NewMemoryConfigClient

func NewMemoryConfigClient(ctx context.Context, files []*ConfigEntry) *ConfigClient

NewMemoryConfigClient creates a config client where the configuration files are stored in memory. See https://go.chromium.org/luci/config/impl/filesystem for the expected directory layout. This should only be used while testing.

func (*ConfigClient) ListSwarmingBots

func (cc *ConfigClient) ListSwarmingBots(ctx context.Context) ([]*SwarmingBot, error)

ListSwarmingBots lists all of the swarming bots in the golang project defined in the cr-buildbucket.cfg configuration file.

type ConfigEntry

type ConfigEntry struct {
	Filename string // name of the file.
	Contents []byte // contents of the configuration file.
}

ConfigEntry represents a configuration file in the configuration directory. It should only be used for testing.

type SwarmingBot

type SwarmingBot struct {
	// BucketName is the name of the bucket the builder is defined in.
	BucketName string
	// Dimensions contains attributes about the builder. Form is in
	// <key>:<value> or <time>:<key>:<value>
	Dimensions []string
	// Host is the hostname of the swarming instance.
	Host string
	// Name of the builder.
	Name string
}

SwarmingBot contains the metadata for a LUCI swarming bot.

Jump to

Keyboard shortcuts

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