Documentation
¶
Overview ¶
Package helper has helpers for using Viper config
Index ¶
- func GetViperCombine(cfg model.Reader, key string) interface{}
- func IsNilValue(a interface{}) bool
- func ParseEnvCSVSplit(key string, config model.Setup)
- func ParseEnvJSONOrComma(key string, config model.Setup)
- func ParseEnvJSONOrSpace(key string, config model.Setup)
- func ParseEnvSplitCommaAndSpace(key string, config model.Setup)
- func ParseEnvSplitCommaThenSpace(key string, config model.Setup)
- func ParseEnvTraceSpan(key string, config model.Setup)
- func SetTree(cfg model.ReaderWriter, key string, value interface{}, source model.Source)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetViperCombine ¶
GetViperCombine returns the value at this key, with all layers combined meant to be used by viper as a work-around for .Get(key) not working
func IsNilValue ¶
func IsNilValue(a interface{}) bool
IsNilValue returns true if a is nil, or a is an interface with nil data
func ParseEnvCSVSplit ¶ added in v0.80.0
ParseEnvCSVSplit is a custom helper for the 'apm_config.ignore_resources' setting.
This implements the env_parser 'csv_coma_separated' from the from the configuration schema.
func ParseEnvJSONOrComma ¶ added in v0.80.0
ParseEnvJSONOrComma is a custom helper for the following settings:
- private_action_runner.restricted_shell.allowed_commands - private_action_runner.restricted_shell.allowed_paths - process_config.custom_sensitive_words
This implements the env_parser 'json_list_or_comma_separated'
func ParseEnvJSONOrSpace ¶ added in v0.80.0
ParseEnvJSONOrSpace is a custom helper for the following settings:
- apm_config.filter_tags.require - apm_config.filter_tags.reject - apm_config.filter_tags_regex.require - apm_config.filter_tags_regex.reject - apm_config.obfuscation.credit_cards.keep_values
This implements the env_parser ”json_list_or_space_separated”
func ParseEnvSplitCommaAndSpace ¶ added in v0.80.0
ParseEnvSplitCommaAndSpace is a custom helper for the 'otelcollector.converter.features' setting.
This implements the env_parser 'comma_and_space_separated'
func ParseEnvSplitCommaThenSpace ¶ added in v0.80.0
ParseEnvSplitCommaThenSpace is a custom helper for the 'apm_config.features' setting.
This implements the env_parser 'comma_then_space_separated'
func ParseEnvTraceSpan ¶ added in v0.80.0
ParseEnvTraceSpan is a custom helper for the 'apm_config.analyzed_spans' setting.
This implements the env_parser 'traces_span' from the configuration schema
Types ¶
This section is empty.