config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessConfig

type AccessConfig struct {
	ServiceName     string `env:"SERVICE_NAME"`
	SystemNamespace string `env:"SYSTEM_NAMESPACE"`
	WebhookAddress  string `env:"WEBHOOK_ADDRESS"`
}

type Config

type Config struct {
	Trace   TraceConfig
	Log     LogConfig
	Server  ServerConfig
	Service AccessConfig
}

Config global config

func NewConfig

func NewConfig() *Config

type LogConfig

type LogConfig struct {
	Level string `env:"LOG_LEVEL" envDefault:"info"`
	Path  string `env:"LOG_PATH" envDefault:"stderr"`
}

type ServerConfig

type ServerConfig struct {
	Port  int `env:"SERVER_PORT" envDefault:"8080"`
	Debug int `env:"SERVER_DEBUG"`
}

type TraceConfig

type TraceConfig struct {
	Enable          bool    `env:"TRACE_ENABLE"`
	JaegerUrl       string  `env:"TRACE_JAEGER_URL"`
	SampleType      string  `env:"TRACE_SAMPLE_TYPE"`
	SampleParam     float64 `env:"TRACE_SAMPLE_PARAM"`
	SampleServerURL string  `env:"TRACE_SAMPLE_SERVER_URL"`
}

Jump to

Keyboard shortcuts

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