experimentation

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 17 Imported by: 1 module, 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

Overview

Package experimentation provides functionality for experimentation in azd. The AssignmentsManager can be used to retrieve the current assignment for the current machine.

Index

Constants

View Source
const AzdVersionParameterName string = "azdversion"

MachineIdParameterName is the name of the parameter used to identify the version of azd in the assignment request.

View Source
const MachineIdParameterName string = "machineid"

MachineIdParameterName is the name of the parameter used to identify the machine ID in the assignment request.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	Features          []string
	Flights           map[string]string
	Configs           []AssignmentConfig
	ParameterGroups   []string
	AssignmentContext string
}

Assignment is a subset of the information returned by the TAS service.

type AssignmentConfig

type AssignmentConfig struct {
	ID         string
	Parameters map[string]any
}

AssignmentConfig is information about a specific config in an assignment.

type AssignmentsManager

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

AssignmentsManager manages interaction with the Assignments service, caching the results for 24 hours.

func NewAssignmentsManager

func NewAssignmentsManager(endpoint string, transport policy.Transporter) (*AssignmentsManager, error)

NewAssignmentsManager creates a new AssignmentManager, which will communicate with the TAS service. The AssignmentManager caches the assignment information for 24 hours in files in the user's config directory under the "experimentation" subdirectory.

func (*AssignmentsManager) Assignment

func (am *AssignmentsManager) Assignment(ctx context.Context) (*Assignment, error)

Assignment gets a the assignment information for this given machine.

When making a request, the current machine ID is passed as a parameter, named "machineid".

Jump to

Keyboard shortcuts

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