experiments

package
v3.47.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package experiments provides a global registry of enabled and disabled experiments.

It is intended for internal use by buildkite-agent only.

Index

Constants

View Source
const (
	PolyglotHooks              = "polyglot-hooks"
	JobAPI                     = "job-api"
	KubernetesExec             = "kubernetes-exec"
	ANSITimestamps             = "ansi-timestamps"
	GitMirrors                 = "git-mirrors"
	FlockFileLocks             = "flock-file-locks"
	ResolveCommitAfterCheckout = "resolve-commit-after-checkout"
	DescendingSpawnPrioity     = "descending-spawn-priority"
	InbuiltStatusPage          = "inbuilt-status-page"
	AgentAPI                   = "agent-api"
	NormalisedUploadPaths      = "normalised-upload-paths"

	StateKnown    State = "known"
	StatePromoted State = "promoted"
	StateUnknown  State = "unknown"
)

Variables

View Source
var (
	Available = map[string]struct{}{
		PolyglotHooks:              {},
		JobAPI:                     {},
		KubernetesExec:             {},
		ANSITimestamps:             {},
		FlockFileLocks:             {},
		ResolveCommitAfterCheckout: {},
		DescendingSpawnPrioity:     {},
		InbuiltStatusPage:          {},
		AgentAPI:                   {},
		NormalisedUploadPaths:      {},
	}

		GitMirrors: fmt.Sprintf("The %s experiment has been promoted to a stable feature. You can safely remove the `--experiment %s` flag to silence this message and continue using the feature", GitMirrors, GitMirrors),
	}
)

Functions

func Disable added in v3.22.0

func Disable(key string)

Disable a particular experiment in the agent.

func EnableWithUndo added in v3.47.0

func EnableWithUndo(key string) func()

func Enabled

func Enabled() []string

Enabled returns the keys of all the enabled experiments.

func IsEnabled

func IsEnabled(key string) bool

IsEnabled reports whether the named experiment is enabled.

Types

type State added in v3.47.0

type State string

func Enable

func Enable(key string) (state State)

Enable a particular experiment in the agent.

func EnableWithWarnings added in v3.47.0

func EnableWithWarnings(l logger.Logger, key string) State

Jump to

Keyboard shortcuts

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