Documentation ¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0 Package config_loader handles loading of configuration from files for services
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type YAMLMetadata ¶
YAMLMetadata stores keeps track of the keys that have been defined in a YAML.
func LoadYamlConfig ¶
func LoadYamlConfig(configObject interface{}, configFilePaths ...string) (*YAMLMetadata, error)
LoadYamlConfig will populate the given configObject (should be a pointer to a struct) with whichever of the given filenames it finds first. There will be no error if a config file is not found - the configObject is assumed to have reasonable defaults.
func ParseConfig ¶
func ParseConfig(rawConfig []byte, configObject interface{}) (keys *YAMLMetadata, err error)
func (YAMLMetadata) Contains ¶
func (p YAMLMetadata) Contains(key string) bool
Contains returns true if the argument key is present in the YAMLMetadata set.
Click to show internal directories.
Click to hide internal directories.