config

package
v1.1.961 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	Port          int    `env:"SHAR_PORT" envDefault:"50000"`
	NatsURL       string `env:"NATS_URL" envDefault:"nats://127.0.0.1:4222"`
	LogHandler    string `env:"SHAR_LOG_HANDLER" envDefault:"text"`
	LogLevel      string `env:"SHAR_LOG_LEVEL" envDefault:"debug"`
	PanicRecovery bool   `env:"SHAR_PANIC_RECOVERY" envDefault:"true"`
	Concurrency   int    `env:"SHAR_CONCURRENCY" envDefault:"10"`
	TracerName    string `env:"SHAR_TRACER_NAME" envDefault:"shar"`
}

Settings is the settings provider for a SHAR server.

func GetEnvironment

func GetEnvironment() (*Settings, error)

GetEnvironment pulls the active settings into a settings struct.

Jump to

Keyboard shortcuts

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