config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Instance = defaultValues()

Instance holds configuration values

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

Types

type Config

type Config struct {
	Sender    SenderConfig
	Forwarder ForwarderConfig
	Receiver  ReceiverConfig
	Readiness ReadinessConfig
	LogLevel  logrus.Level
}

Config hold complete configuration

type ForwarderConfig added in v0.4.0

type ForwarderConfig struct {
	Target string
	Port   int
}

ForwarderConfig holds configuration for forwarder

type ReadinessConfig added in v0.5.0

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
	Port     int
}

ReceiverConfig hold configuration for receiver

type ReceiverProgressConfig added in v0.4.2

type ReceiverProgressConfig struct {
	Duration time.Duration
}

ReceiverProgressConfig holds config receiver progress reporting

type ReceiverTeardownConfig

type ReceiverTeardownConfig struct {
	Duration time.Duration
}

ReceiverTeardownConfig holds config receiver teardown

type SenderConfig

type SenderConfig struct {
	Address  string
	Interval time.Duration
	Cooldown 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