pkgsite: golang.org/x/pkgsite/internal/experiment Index | Files

package experiment

import "golang.org/x/pkgsite/internal/experiment"

Index

Package Files

experiment.go

func IsActive Uses

func IsActive(ctx context.Context, experiment string) bool

IsActive reports whether an experiment is active for this set.

func NewContext Uses

func NewContext(ctx context.Context, experimentNames ...string) context.Context

NewContext stores the provided experiment set in the context.

type Set Uses

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

Set is the set of experiments that are enabled for a request.

func FromContext Uses

func FromContext(ctx context.Context) *Set

FromContent returns the set of experiments enabled for the content.

func NewSet Uses

func NewSet(experimentNames ...string) *Set

NewSet creates a new experiment.Set with the data provided.

func (*Set) Active Uses

func (s *Set) Active() []string

Active returns a list of all the active experiments in s.

func (*Set) IsActive Uses

func (s *Set) IsActive(experiment string) bool

IsActive reports whether an experiment is active for this set.

Package experiment imports 1 packages (graph) and is imported by 15 packages. Updated 2020-08-05. Refresh now. Tools for package owners.