configmodels

package
Version: v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type ExporterSettings struct {
	TypeVal Type   `mapstructure:"-"`
	NameVal string `mapstructure:"-"`
}

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 Exporters

type Exporters map[string]Exporter

Exporters is a map of names to Exporters.

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

type ExtensionSettings struct {
	TypeVal Type   `mapstructure:"-"`
	NameVal string `mapstructure:"-"`
}

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 Extensions

type Extensions map[string]Extension

Extensions is a map of names to extensions.

type NamedEntity

type NamedEntity interface {
	Type() Type
	Name() string
	SetName(name string)
}

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 Pipelines

type Pipelines map[string]*Pipeline

Pipelines is a map of names to Pipelines.

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

type ProcessorSettings struct {
	TypeVal Type   `mapstructure:"-"`
	NameVal string `mapstructure:"-"`
}

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 Processors

type Processors map[string]Processor

Processors is a map of names to Processors.

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

type ReceiverSettings struct {
	TypeVal Type   `mapstructure:"-"`
	NameVal string `mapstructure:"-"`
}

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 Receivers

type Receivers map[string]Receiver

Receivers is a map of names to Receivers.

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.

type Type

type Type string

Type is the component type as it is used in the config.

Source Files

Jump to

Keyboard shortcuts

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