Version: v0.37.0 Latest Latest

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 6 Imported by: 0



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



This section is empty.


This section is empty.


This section is empty.


type ConfigSourceCreateSettings

type ConfigSourceCreateSettings struct {
	// Logger that the factory can use during creation and can pass to the created
	// Source to be used later as well.
	Logger *zap.Logger

	// BuildInfo can be used to retrieve data according to version, etc.
	BuildInfo component.BuildInfo

ConfigSourceCreateSettings is passed to ConfigSourceFactory.CreateConfigSource function.

type ConfigSourceFactories

type ConfigSourceFactories map[stableconfig.Type]ConfigSourceFactory

ConfigSourceFactories maps the type of a ConfigSource to the respective factory object.

type ConfigSourceFactory

type ConfigSourceFactory interface {

	// CreateDefaultConfig creates the default configuration settings for the Source.
	// This method can be called multiple times depending on the pipeline
	// configuration and should not cause side-effects that prevent the creation
	// of multiple instances of the Source.
	// The object returned by this method needs to pass the checks implemented by
	// 'configtest.CheckConfigStruct'. It is recommended to have such check in the
	// tests of any implementation of the ConfigSourceFactory interface.
	CreateDefaultConfig() config.Source

	// CreateConfigSource creates a configuration source based on the given config.
		ctx context.Context,
		set ConfigSourceCreateSettings,
		cfg config.Source,
	) (configsource.ConfigSource, error)

ConfigSourceFactory is a factory interface for configuration sources.

Source Files

Jump to

Keyboard shortcuts

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