labels

package
v0.0.0-...-12a582f Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ExperimentLabelDefault is The default label name for label/tagging an experiment identifier
	// onto a resources
	ExperimentLabelDefault = "experiment"

	// AssignmentLabelDefault is the default label name for label/tagging an experiment identifier
	// onto a resources
	AssignmentLabelDefault = "assignment"

	// VariantLabelDefault is the default label name for label/tagging an experiment identifier
	// onto a resources
	VariantLabelDefault = "variant"
)

Variables

This section is empty.

Functions

func AssignmentLabelName

func AssignmentLabelName() string

AssignmentLabelName returns the name value for the experiment label, and respects override configuration form environment variable

func Compare

func Compare() bool

func ExperimentLabelName

func ExperimentLabelName() string

ExperimentLabelName returns the name value for the experiment label, and respects override configuration form environment variable

func VariantLabelName

func VariantLabelName() string

VariantLabelName returns the name value for the experiment label, and respects override configuration from environment variable

Types

type Label

type Label struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Label is a k/v pair of label name/values

func FromEC2Tag

func FromEC2Tag(tag *ec2.Tag) Label

func FromEC2Tags

func FromEC2Tags(tags []*ec2.Tag) []Label

func NewLabels

func NewLabels() []Label

NewLabels returns a set of labels with names set by their defaults

func (*Label) Diff

func (l *Label) Diff(compare Labels) Labels

type Labels

type Labels []Label

Labels is a collection of labels

func (*Labels) Any

func (l *Labels) Any() bool

func (*Labels) Contains

func (l *Labels) Contains(label Label) bool

func (*Labels) Intersect

func (l *Labels) Intersect(compare Labels) Labels

func (*Labels) Union

func (l *Labels) Union(join Labels) Labels

Jump to

Keyboard shortcuts

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