Documentation ¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFeatureFlagAlreadyExists = errors.New("feature flag already exists")
)
Functions ¶
This section is empty.
Types ¶
type FeatureFlags ¶
type FeatureFlags struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(initialFeatureFlags map[string]bool) *FeatureFlags
func (*FeatureFlags) GetFeatureFlag ¶
func (f *FeatureFlags) GetFeatureFlag(name string) (enabled, exists bool)
GetFeatureFlag returns if a FF is enabled and exists
func (*FeatureFlags) SetFeatureFlag ¶
func (f *FeatureFlags) SetFeatureFlag(name string, enabled bool) error
SetFeatureFlag adds a new FF to the config. FFs can be defined in the agent's config file or they may come from the Command Channel. As the command channel runs asynchronously, we need to lock the feature flags.
Click to show internal directories.
Click to hide internal directories.