configparser

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package configparser implements loading of configuration from Viper configuration. The implementation relies on registered factories that allow creating default configuration for each type of receiver/exporter/processor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTypeAndName

func DecodeTypeAndName(key string) (typeStr config.Type, fullName string, err error)

DecodeTypeAndName decodes a key in type[/name] format into type and fullName. fullName is the key normalized such that type and name components have spaces trimmed. The "type" part must be present, the forward slash and "name" are optional. typeStr will be non-empty if err is nil.

func Load

func Load(v *config.Parser, factories component.Factories) (*config.Config, error)

Load loads a Config from Parser. After loading the config, need to check if it is valid by calling `ValidateConfig`.

func LoadReceiver

func LoadReceiver(componentConfig *config.Parser, fullName string, factory component.ReceiverFactory) (config.Receiver, error)

LoadReceiver loads a receiver config from componentConfig using the provided factories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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