config

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config under config/experimental contains configuration related types and interfaces that typically live under the "go.opentelemetry.io/collector/config" package but aren't stable yet to be published there. ATTENTION: the package is still experimental and subject to changes without advanced notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source interface {

	// ID returns the ID of the component that this configuration belongs to.
	ID() config.ComponentID
	// SetIDName updates the name part of the ID for the component that this configuration belongs to.
	SetIDName(idName string)

	// Validate validates the configuration and returns an error if invalid.
	Validate() error
}

Source is the configuration of a config source. Specific config sources must implement this interface and will typically embed SourceSettings struct or a struct that extends it.

type SourceSettings

type SourceSettings struct {
	config.ComponentID `mapstructure:"-"`
}

SourceSettings defines common settings of a Source configuration. Specific config sources can embed this struct and extend it with more fields if needed. When embedded it must be with `mapstructure:",squash"` tag.

func NewSourceSettings

func NewSourceSettings(id config.ComponentID) SourceSettings

NewSourceSettings return a new config.SourceSettings struct with the given ComponentID.

func (*SourceSettings) ID

ID returns the ID of the component that this configuration belongs to.

func (*SourceSettings) SetIDName

func (s *SourceSettings) SetIDName(idName string)

SetIDName updates the name part of the ID for the component that this configuration belongs to.

Jump to

Keyboard shortcuts

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