toggles

package
v0.20240415.2-devinwon Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Fields map[string]string
}

Entity is what we resolve toggles against. It contains any and all fields currently used to resolve the set of toggles applied to the agentbakersvc instance.

func NewEntity

func NewEntity(fields map[string]string) *Entity

NewEntity constructs a new Entity from the specified fields.

func NewEntityFromEnvironmentInfo

func NewEntityFromEnvironmentInfo(envInfo *datamodel.EnvironmentInfo) *Entity

NewEntityFromEnvironmentInfo constructs and returns a new Entity populated with fields from the specified EnvironmentInfo.

func NewEntityFromNodeBootstrappingConfiguration

func NewEntityFromNodeBootstrappingConfiguration(nbc *datamodel.NodeBootstrappingConfiguration) *Entity

NewEntityFromNodeBootstrappingConfiguration constructs and returns a new Entity with fields from the specified NodeBootstrappingConfiguration.

type MapToggle

type MapToggle func(entity *Entity) map[string]string

MapToggle is a toggle which resolves a map against a specified Entity.

type StringToggle

type StringToggle func(entity *Entity) string

StringToggle is a toggle which resolves a string against a specified Entity.

type Toggles

type Toggles struct {
	// Maps is the set of toggles which return map values.
	Maps map[string]MapToggle
	// Strings is the set of toggles which return string values
	Strings map[string]StringToggle
}

Toggles is a set of toggles to run the agentbakersvc instance with.

func New

func New() *Toggles

New constructs a new and empty set of toggles.

func (*Toggles) GetLinuxNodeImageVersion

func (t *Toggles) GetLinuxNodeImageVersion(entity *Entity) map[string]string

GetLinuxNodeImageVersion gets the value of the 'linux-node-image-version' map toggle.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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