config

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RegularExpression = "${_|[A-Z]+:.*}"

${ENV:defaultVal} pattern is supported to override the default value by the env config. And the value would be converted to the different types, such as int, float64 ana string. If you want to keep it as the string value, please decorate it with `"`.

Variables

This section is empty.

Functions

This section is empty.

Types

type PipeConfig

type PipeConfig struct {
	PipeCommonConfig *config.CommonFields       `mapstructure:"common_config"`
	Gatherer         *gatherer.GathererConfig   `mapstructure:"gatherer"`
	Processor        *processor.ProcessorConfig `mapstructure:"processor"`
	Sender           *sender.SenderConfig       `mapstructure:"sender"`
}

PipeConfig initializes the different module in different namespace.

type SatelliteConfig

type SatelliteConfig struct {
	Logger    *log.LoggerConfig `mapstructure:"logger"`
	Pipes     []*PipeConfig     `mapstructure:"pipes"`
	Sharing   *SharingConfig    `mapstructure:"sharing"`
	Telemetry *telemetry.Config `mapstructure:"telemetry"`
}

SatelliteConfig is to initialize Satellite.

func Load

func Load(configPath string) *SatelliteConfig

Load SatelliteConfig. The func could not use global logger of Satellite, because it is executed before logger initialization.

func NewDefaultSatelliteConfig

func NewDefaultSatelliteConfig() *SatelliteConfig

NewDefaultSatelliteConfig creates a satellite config with default value.

type SharingConfig

type SharingConfig struct {
	Clients             []plugin.Config      `mapstructure:"clients"`
	Servers             []plugin.Config      `mapstructure:"servers"`
	SharingCommonConfig *config.CommonFields `mapstructure:"common_config"`
}

SharingConfig contains some plugins,which could be shared by every namespace. That is useful to reduce resources cost.

Jump to

Keyboard shortcuts

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