config_loader

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

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

type YAMLMetadata map[string]bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL