config

package
v0.0.0-...-ef50af7 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr   string          `split_words:"true" default:":8318"`
	LogLevel   LogLevelDecoder `split_words:"true" default:"info"`
	ConsoleLog bool            `split_words:"true" default:"false"`
	Endpoint   string          `split_words:"true" default:"localhost:8318"`
	NoSecure   bool            `split_words:"true" default:"false"`
	Interval   time.Duration   `split_words:"true" default:"1m"`
	Originator string          `split_words:"true" required:"true"`
	// contains filtered or unexported fields
}

func New

func New() (_ Config, err error)

New creates a new Config object, loading environment variables and defaults.

func (Config) GetLogLevel

func (c Config) GetLogLevel() zerolog.Level

func (Config) IsZero

func (c Config) IsZero() bool

type LogLevelDecoder

type LogLevelDecoder zerolog.Level

LogLevelDecoder deserializes the log level from a config string.

func (*LogLevelDecoder) Decode

func (ll *LogLevelDecoder) Decode(value string) error

Decode implements envconfig.Decoder

Jump to

Keyboard shortcuts

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