config

package
v0.43.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultReceiverPort point to a default port of receiver component, and is
	// unique so that components can be easily run on localhost for easy debugging
	DefaultReceiverPort = 22111
	// DefaultForwarderPort point to a default port of forwarder component
	DefaultForwarderPort = 22110
)

Variables

View Source
var Instance = defaultValues()

Instance holds configuration values

View Source
var Log = newLogger()

Log is a default logger for wathola

Functions

func Read

func Read(configFile string) error

Read a config file and update configuration object

func ReadIfPresent

func ReadIfPresent()

ReadIfPresent read a configuration file if it exists

func SetupTracing added in v0.29.2

func SetupTracing()

func ShutdownTracing added in v0.34.0

func ShutdownTracing()

Types

type Config

type Config struct {
	Sender        SenderConfig
	Forwarder     ForwarderConfig
	Receiver      ReceiverConfig
	Readiness     ReadinessConfig
	LogLevel      string
	TracingConfig string
}

Config hold complete configuration

type ForwarderConfig

type ForwarderConfig struct {
	Target string
	Port   int
}

ForwarderConfig holds configuration for forwarder

type ReadinessConfig

type ReadinessConfig struct {
	Enabled bool
	URI     string
	Message string
	Status  int
}

ReadinessConfig holds a readiness configuration

type ReceiverConfig

type ReceiverConfig struct {
	Teardown ReceiverTeardownConfig
	Progress ReceiverProgressConfig
	Errors   ReceiverErrorConfig
	Port     int
}

ReceiverConfig hold configuration for receiver

type ReceiverErrorConfig added in v0.21.0

type ReceiverErrorConfig struct {
	UnavailablePeriodToReport time.Duration
}

ReceiverErrorConfig holds error reporting config of the receiver

type ReceiverProgressConfig

type ReceiverProgressConfig struct {
	Duration time.Duration
}

ReceiverProgressConfig holds config receiver progress reporting

type ReceiverTeardownConfig

type ReceiverTeardownConfig struct {
	Duration time.Duration
	Interval time.Duration
}

ReceiverTeardownConfig holds config receiver teardown

type SenderConfig

type SenderConfig struct {
	Address  interface{}
	Interval time.Duration
}

SenderConfig hold configuration for sender

Jump to

Keyboard shortcuts

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