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 ¶
const AzdVersionParameterName string = "azdversion"
MachineIdParameterName is the name of the parameter used to identify the version of azd in the assignment request.
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 ¶
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".