Documentation ¶
Overview ¶
Package configmodels 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.
Index ¶
- type Config
- type DataType
- type Exporter
- type ExporterSettings
- type Exporters
- type Extension
- type ExtensionSettings
- type Extensions
- type NamedEntity
- type Pipeline
- type Pipelines
- type Processor
- type ProcessorSettings
- type Processors
- type Receiver
- type ReceiverSettings
- type Receivers
- type Service
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Receivers Exporters Processors Extensions Service }
Config defines the configuration for the various elements of collector or agent.
type DataType ¶
type DataType string
const ( // TracesDataType is the data type tag for traces. TracesDataType DataType = "traces" // MetricsDataType is the data type tag for metrics. MetricsDataType DataType = "metrics" // LogsDataType is the data type tag for logs. LogsDataType DataType = "logs" )
Currently supported data types. Add new data types here when new types are supported in the future.
type Exporter ¶
type Exporter interface { NamedEntity }
Exporter is the configuration of an exporter.
type ExporterSettings ¶
ExporterSettings defines common settings for an exporter configuration. Specific exporters can embed this struct and extend it with more fields if needed.
func (*ExporterSettings) Name ¶
func (es *ExporterSettings) Name() string
Name gets the exporter name.
func (*ExporterSettings) SetName ¶
func (es *ExporterSettings) SetName(name string)
SetName sets the exporter name.
func (*ExporterSettings) Type ¶
func (es *ExporterSettings) Type() Type
Type sets the exporter type.
type Extension ¶
type Extension interface { NamedEntity }
Extension is the configuration of a service extension. Specific extensions must implement this interface and will typically embed ExtensionSettings struct or a struct that extends it.
type ExtensionSettings ¶
ExtensionSettings defines common settings for a service extension configuration. Specific extensions can embed this struct and extend it with more fields if needed.
func (*ExtensionSettings) Name ¶
func (ext *ExtensionSettings) Name() string
Name gets the extension name.
func (*ExtensionSettings) SetName ¶
func (ext *ExtensionSettings) SetName(name string)
SetName sets the extension name.
func (*ExtensionSettings) Type ¶
func (ext *ExtensionSettings) Type() Type
Type sets the extension type.
type NamedEntity ¶
NamedEntity is a configuration entity that has a type and a name.
type Pipeline ¶
type Pipeline struct { Name string `mapstructure:"-"` InputType DataType `mapstructure:"-"` Receivers []string `mapstructure:"receivers"` Processors []string `mapstructure:"processors"` Exporters []string `mapstructure:"exporters"` }
Pipeline defines a single pipeline.
type Processor ¶
type Processor interface { NamedEntity }
Processor is the configuration of a processor. Specific processors must implement this interface and will typically embed ProcessorSettings struct or a struct that extends it.
type ProcessorSettings ¶
ProcessorSettings defines common settings for a processor configuration. Specific processors can embed this struct and extend it with more fields if needed.
func (*ProcessorSettings) Name ¶
func (proc *ProcessorSettings) Name() string
Name gets the processor name.
func (*ProcessorSettings) SetName ¶
func (proc *ProcessorSettings) SetName(name string)
SetName sets the processor name.
func (*ProcessorSettings) Type ¶
func (proc *ProcessorSettings) Type() Type
Type sets the processor type.
type Receiver ¶
type Receiver interface { NamedEntity }
Receiver is the configuration of a receiver. Specific receivers must implement this interface and will typically embed ReceiverSettings struct or a struct that extends it.
type ReceiverSettings ¶
ReceiverSettings defines common settings for a receiver configuration. Specific receivers can embed this struct and extend it with more fields if needed.
func (*ReceiverSettings) Name ¶
func (rs *ReceiverSettings) Name() string
Name gets the receiver name.
func (*ReceiverSettings) SetName ¶
func (rs *ReceiverSettings) SetName(name string)
SetName sets the receiver name.
func (*ReceiverSettings) Type ¶
func (rs *ReceiverSettings) Type() Type
Type sets the receiver type.
type Service ¶
type Service struct { // Extensions is the ordered list of extensions configured for the service. Extensions []string `mapstructure:"extensions"` // Pipelines is the set of data pipelines configured for the service. Pipelines Pipelines `mapstructure:"pipelines"` }
Service defines the configurable components of the service.