Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureFlag ¶
type FeatureFlag struct {
// contains filtered or unexported fields
}
FeatureFlag represents a command line switch to turn certain features ON or OFF. Values are read from environment variables defined by the feature flag. The feature flag can have default values that are used when the resp. environment variable does not exist
func AutomationResources ¶
func AutomationResources() FeatureFlag
AutomationResources returns the feature flag that tells whether the automation-resource handling is enabled or not.
func DangerousCommands ¶
func DangerousCommands() FeatureFlag
DangerousCommands returns the feature flag that tells whether dangerous commands for the CLI are enabled or not
func Entities ¶
func Entities() FeatureFlag
Entities returns the feature flag that tells whether Dynatrace Entities download/matching is enabled or not
func FastDependencyResolver ¶
func FastDependencyResolver() FeatureFlag
FastDependencyResolver returns the feature flag controlling whether the fast (but memory intensive) Aho-Corasick algorithm based dependency resolver is used when downloading. If set to false, the old naive and CPU intensive resolver is used.
func ManagementZoneSettingsNumericIDs ¶
func ManagementZoneSettingsNumericIDs() FeatureFlag
ManagementZoneSettingsNumericIDs returns the feature flag that tells whether configs of settings type builtin:management-zones are addressed directly via their object ID or their resolved numeric ID when they are referenced.
func New ¶
func New(envName string, defaultEnabled bool) FeatureFlag
New creates a new FeatureFlag envName is the environment variable the feature flag is loading the values from when evaluated defaultEnabled defines whether the feature flag is enabled or not by default
func VerifyEnvironmentType ¶
func VerifyEnvironmentType() FeatureFlag
VerifyEnvironmentType returns the feature flag that tells whether the environment check at the beginning of execution is enabled or not
func (FeatureFlag) Enabled ¶
func (ff FeatureFlag) Enabled() bool
Enabled evaluates the feature flag. Feature flags are considered to be "enabled" if their resp. environment variable is set to 1, t, T, TRUE, true or True. Feature flags are considered to be "disabled" if their resp. environment variable is set to 0, f, F, FALSE, false or False.
func (FeatureFlag) EnvName ¶
func (ff FeatureFlag) EnvName() string
EnvName gives back the environment variable name for the feature flag