discovery

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GCPFolderID                    string        `env:"GCP_FOLDER_ID"`
	AllowedGithubOrgScopes         string        `env:"GCP_ALLOWED_PROJECT_LABEL_GH_ORG_SCOPE_VALUES"`
	AllowedJobRunsOn               string        `env:"GCP_ALLOWED_PROJECT_LABEL_JOB_RUNS_ON_VALUES"`
	AllowedPoolLocations           string        `env:"GCP_ALLOWED_PROJECT_LABEL_POOL_LOCATION_VALUES"`
	AllowedPoolAvailabilities      string        `env:"GCP_ALLOWED_PROJECT_LABEL_POOL_AVAILABILITY_VALUES"`
	AllowedPoolTypes               string        `env:"GCP_ALLOWED_PROJECT_LABEL_POOL_TYPE_VALUES"`
	AllowedTrustedRemoteConfigs    []string      `env:"GCP_ALLOWED_PROJECT_LABEL_TRUSTED_REMOTE_CONFIG_VALUES"`
	AllowedExtraRunnerCounts       string        `env:"GCP_ALLOWED_PROJECT_LABEL_EXTRA_RUNNER_COUNT_VALUES"`
	IgnoredGCPProjectLabels        string        `env:"GCP_IGNORED_PROJECT_LABELS"`
	MaxRetryAttempts               int           `env:"MAX_RETRY_ATTEMPTS,default=3"`
	BackoffInitialDelay            time.Duration `env:"BACKOFF_INITIAL_DELAY,default=500ms"`
	RunnerRegistryDefaultKeyPrefix string        `env:"RUNNER_REGISTRY_DEFAULT_KEY_PREFIX,default=default"`
}

Config defines the set of environment variables required for running the runner-discovery job.

func NewConfig

func NewConfig(ctx context.Context) (*Config, error)

NewConfig creates a new Config from environment variables.

func (*Config) GetAllowedExtraRunnerCounts added in v0.1.13

func (c *Config) GetAllowedExtraRunnerCounts() []string

func (*Config) GetAllowedGithubOrgScopes added in v0.1.4

func (c *Config) GetAllowedGithubOrgScopes() []string

func (*Config) GetAllowedJobRunsOn added in v0.1.4

func (c *Config) GetAllowedJobRunsOn() []string

func (*Config) GetAllowedPoolAvailabilities added in v0.1.4

func (c *Config) GetAllowedPoolAvailabilities() []string

func (*Config) GetAllowedPoolLocations added in v0.1.4

func (c *Config) GetAllowedPoolLocations() []string

func (*Config) GetAllowedPoolTypes added in v0.1.5

func (c *Config) GetAllowedPoolTypes() []string

func (*Config) GetAllowedTrustedRemoteConfigs added in v0.1.10

func (c *Config) GetAllowedTrustedRemoteConfigs() []string

func (*Config) GetIgnoredGCPProjectLabels added in v0.1.5

func (c *Config) GetIgnoredGCPProjectLabels() []string

func (*Config) GetIgnoredGCPProjectLabelsSet added in v0.1.5

func (c *Config) GetIgnoredGCPProjectLabelsSet() map[string]struct{}

func (*Config) GetOptionalGCPProjectLabelsSet added in v0.1.5

func (c *Config) GetOptionalGCPProjectLabelsSet() map[string]struct{}

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates the runner-discovery config after load.

type RunnerDiscovery

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

RunnerDiscovery is the main struct for the runner-discovery job.

func NewRunnerDiscovery

func NewRunnerDiscovery(ctx context.Context, config *Config, rc *redisapi.Client) (*RunnerDiscovery, error)

func (*RunnerDiscovery) Run

func (rd *RunnerDiscovery) Run(ctx context.Context) error

Run discovers worker pool projects and caches them in a runner registry.

Jump to

Keyboard shortcuts

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