configunmarshaler

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package configunmarshaler implements configuration unmarshalling from a config.Parser. 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 LoadReceiver

func LoadReceiver(componentConfig *configparser.ConfigMap, id config.ComponentID, factory component.ReceiverFactory) (config.Receiver, error)

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

Types

type ConfigUnmarshaler

type ConfigUnmarshaler interface {
	// Unmarshal the configuration from the given parser and factories.
	Unmarshal(v *configparser.ConfigMap, factories component.Factories) (*config.Config, error)
}

ConfigUnmarshaler is the interface that unmarshalls the collector configuration from the configparser.ConfigMap.

func NewDefault

func NewDefault() ConfigUnmarshaler

NewDefault returns a default ConfigUnmarshaler that unmarshalls every configuration using the custom unmarshaler if present or default to strict

Jump to

Keyboard shortcuts

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