config

package
v0.0.0-...-649a0e1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base64Decoder

type Base64Decoder []byte

func (*Base64Decoder) Decode

func (ipd *Base64Decoder) Decode(value string) error

type Config

type Config struct {
	ListenAddr      string        `default:"localhost:4005" validate:"hostname_port" envconfig:"LISTEN_ADDR"`
	LogLevel        string        `default:"info" envconfig:"LOG_LEVEL" validate:"oneof=debug info warning error fatal panic"`
	IngestJWTSecret string        `envconfig:"INGEST_JWT_SECRET" validate:"required"`
	ClickHouseDSN   string        `envconfig:"CLICKHOUSE_DSN" validate:"required,url"`
	JSONLog         bool          `default:"true" envconfig:"JSON_LOG"`
	ShutdownDelay   time.Duration `default:"30s" validate:"required,min=5s" envconfig:"SHUTDOWN_DELAY"`
}

func LoadConfig

func LoadConfig() (*Config, error)

Jump to

Keyboard shortcuts

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