strategy

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ParamHostNames is a parameter indicating a comma separated list of hostnames.
	ParamHostNames = "hostNames"

	// ParamPercentage is a property indicating a percentage.
	ParamPercentage = "percentage"

	// ParamGroupId is a property indicating a group ID.
	ParamGroupId = "groupId"

	// ParamIps is a property indicating a comma separated list of ip addresses.
	ParamIps = "IPs"

	// ParamUserIds is a property indicating a comma separated list of user ids.
	ParamUserIds = "userIds"

	// ParamStickiness indicates which context property is sticky.
	ParamStickiness = "stickiness"

	// ParamRollout is a property indicating a rollout percentage.
	ParamRollout = "rollout"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

type Strategy interface {
	// Name should return name of the strategy.
	Name() string

	// IsEnabled should look at the map of parameters and optionally
	// the supplied context and return true if the feature should be
	// enabled.
	IsEnabled(map[string]interface{}, *context.Context) bool
}

Strategy is an interface for defining new custom strategies.

Jump to

Keyboard shortcuts

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