Documentation ¶
Index ¶
Constants ¶
const Events = "events"
const MultipleContainersPerPod = "multiple_containers_per_pod"
const Snapshots = "snapshots"
Variables ¶
var MainDefaults = Defaults{ MultipleContainersPerPod: Value{ Enabled: true, Status: Active, }, Events: Value{ Enabled: true, Status: Active, }, Snapshots: Value{ Enabled: false, Status: Active, }, }
MainDefaults is the defaults we use in Main
Functions ¶
This section is empty.
Types ¶
type FeatureSet ¶ added in v0.9.5
FeatureSet is a mutable set of Features.
func FromDefaults ¶ added in v0.9.5
func FromDefaults(d Defaults) FeatureSet
Create a FeatureSet from defaults.
func (FeatureSet) Get ¶ added in v0.9.5
func (s FeatureSet) Get(name string) bool
Get gets whether a feature is enabled.
func (FeatureSet) Set ¶ added in v0.9.5
func (s FeatureSet) Set(name string, enabled bool) error
Set sets enabled for a feature if it's active. Returns an error if flag is unknown or obsolete.
func (FeatureSet) ToEnabled ¶ added in v0.9.5
func (s FeatureSet) ToEnabled() map[string]bool
ToEnabled returns a copy of the enabled values of the FeatureSet
type ObsoleteError ¶ added in v0.9.5
type ObsoleteError string
ObsoleteError is an error that a feature flag is obsolete
func (ObsoleteError) Error ¶ added in v0.9.5
func (s ObsoleteError) Error() string
type Status ¶ added in v0.9.5
type Status int
The status of a feature flag It starts as Active (we're using this flag to evaluate the feature) Then when we no longer need it, we make it a noop. Leave it for an upgrade cycle. Then move it to Obsolete, which will cause a warning. Leave it for an upgrade cycle. Then remove the flag altogether.