config

package
Version: v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 1 Imported by: 352

Documentation

Overview

Package config defines the data models for entities. This file defines the models for configuration format. The defined entities are: Config (the top-level structure), Receivers, Exporters, Processors, Pipelines.

Receivers, Exporters and Processors typically have common configuration settings, however sometimes specific implementations will have extra configuration settings. This requires the configuration data for these entities to be polymorphic.

To satisfy these requirements we declare interfaces Receiver, Exporter, Processor, which define the behavior. We also provide helper structs ReceiverSettings, ExporterSettings, ProcessorSettings, which define the common settings and unmarshaling from config files.

Specific Receivers/Exporters/Processors are expected to at the minimum implement the corresponding interface and if they have additional settings they must also extend the corresponding common settings struct (the easiest approach is to embed the common struct).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExporterSettings added in v0.24.0

type ExporterSettings struct {
	component.ExporterConfig
	// contains filtered or unexported fields
}

ExporterSettings defines common settings for a component.Exporter configuration. Specific exporters can embed this struct and extend it with more fields if needed.

It is highly recommended to "override" the Validate() function.

When embedded in the exporter config, it must be with `mapstructure:",squash"` tag.

func NewExporterSettings added in v0.24.0

func NewExporterSettings(id component.ID) ExporterSettings

NewExporterSettings return a new ExporterSettings with the given ComponentID.

func (*ExporterSettings) ID added in v0.26.0

func (es *ExporterSettings) ID() component.ID

ID returns the receiver component.ID.

func (*ExporterSettings) SetIDName added in v0.26.0

func (es *ExporterSettings) SetIDName(idName string)

SetIDName sets the receiver name.

func (*ExporterSettings) Validate deprecated added in v0.25.0

func (es *ExporterSettings) Validate() error

Deprecated: [v0.65.0] use component.ValidateConfig.

type ExtensionSettings added in v0.24.0

type ExtensionSettings struct {
	component.ExtensionConfig
	// contains filtered or unexported fields
}

ExtensionSettings defines common settings for a component.Extension configuration. Specific processors can embed this struct and extend it with more fields if needed.

It is highly recommended to "override" the Validate() function.

When embedded in the extension config, it must be with `mapstructure:",squash"` tag.

func NewExtensionSettings added in v0.24.0

func NewExtensionSettings(id component.ID) ExtensionSettings

NewExtensionSettings return a new ExtensionSettings with the given ID.

func (*ExtensionSettings) ID added in v0.26.0

func (es *ExtensionSettings) ID() component.ID

ID returns the receiver ID.

func (*ExtensionSettings) SetIDName added in v0.26.0

func (es *ExtensionSettings) SetIDName(idName string)

SetIDName sets the receiver name.

func (*ExtensionSettings) Validate deprecated added in v0.25.0

func (es *ExtensionSettings) Validate() error

Deprecated: [v0.65.0] use component.ValidateConfig.

type Pipeline added in v0.24.0

type Pipeline struct {
	Receivers  []component.ID `mapstructure:"receivers"`
	Processors []component.ID `mapstructure:"processors"`
	Exporters  []component.ID `mapstructure:"exporters"`
}

Pipeline defines a single pipeline. Deprecated: [v0.52.0] Use service.ConfigServicePipeline

type Pipelines deprecated added in v0.24.0

type Pipelines = map[component.ID]*Pipeline

Deprecated: [v0.52.0] will be removed soon.

type ProcessorSettings added in v0.24.0

type ProcessorSettings struct {
	component.ProcessorConfig
	// contains filtered or unexported fields
}

ProcessorSettings defines common settings for a component.Processor configuration. Specific processors can embed this struct and extend it with more fields if needed.

It is highly recommended to "override" the Validate() function.

When embedded in the processor config it must be with `mapstructure:",squash"` tag.

func NewProcessorSettings added in v0.24.0

func NewProcessorSettings(id component.ID) ProcessorSettings

NewProcessorSettings return a new ProcessorSettings with the given ComponentID.

func (*ProcessorSettings) ID added in v0.26.0

func (ps *ProcessorSettings) ID() component.ID

ID returns the receiver ComponentID.

func (*ProcessorSettings) SetIDName added in v0.26.0

func (ps *ProcessorSettings) SetIDName(idName string)

SetIDName sets the receiver name.

func (*ProcessorSettings) Validate deprecated added in v0.25.0

func (ps *ProcessorSettings) Validate() error

Deprecated: [v0.65.0] use component.ValidateConfig.

type ReceiverSettings added in v0.24.0

type ReceiverSettings struct {
	component.ReceiverConfig
	// contains filtered or unexported fields
}

ReceiverSettings defines common settings for a component.Receiver configuration. Specific receivers can embed this struct and extend it with more fields if needed.

It is highly recommended to "override" the Validate() function.

When embedded in the receiver config it must be with `mapstructure:",squash"` tag.

func NewReceiverSettings added in v0.26.0

func NewReceiverSettings(id component.ID) ReceiverSettings

NewReceiverSettings return a new ReceiverSettings with the given ID.

func (*ReceiverSettings) ID added in v0.26.0

func (rs *ReceiverSettings) ID() component.ID

ID returns the receiver ID.

func (*ReceiverSettings) SetIDName added in v0.26.0

func (rs *ReceiverSettings) SetIDName(idName string)

SetIDName sets the receiver name.

func (*ReceiverSettings) Validate deprecated added in v0.24.0

func (rs *ReceiverSettings) Validate() error

Deprecated: [v0.65.0] Not needed anymore since the Validate() will be moved from Config interface to the optional ConfigValidator interface.

Directories

Path Synopsis
Package configauth implements the configuration settings to ensure authentication on incoming requests, and allows exporters to add authentication on outgoing requests.
Package configauth implements the configuration settings to ensure authentication on incoming requests, and allows exporters to add authentication on outgoing requests.
Package configgrpc defines the configuration settings to create a gRPC client and server.
Package configgrpc defines the configuration settings to create a gRPC client and server.
Package confighttp defines the configuration settings for creating an HTTP client and server.
Package confighttp defines the configuration settings for creating an HTTP client and server.
Package confignet implements the configuration settings for protocols to connect and transport data information.
Package confignet implements the configuration settings for protocols to connect and transport data information.
Package configtelemetry defines various telemetry level for configuration.
Package configtelemetry defines various telemetry level for configuration.
Package configtls implements the TLS settings to load and configure TLS clients and servers.
Package configtls implements the TLS settings to load and configure TLS clients and servers.

Jump to

Keyboard shortcuts

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