config

package
v0.0.0-...-5182124 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: AGPL-3.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 Broker

type Broker struct {
	URL   string `envconfig:"MQTT_URL" default:"mqtt://10.76.0.101:1883"`
	Topic string `envconfig:"MQTT_TOPIC" default:"shellypro3em-3ce90e7025c8/events/rpc"`
}

type Config

type Config struct {
	LogLevel    slog.Level `envconfig:"LOG_LEVEL" default:"INFO"`
	MetricsAddr string     `envconfig:"METRICS_ADDRESS" default:":8080"`

	Database Database
	Broker   Broker
}

func Get

func Get() (*Config, error)

type Database

type Database struct {
	URL          string `envconfig:"DB_URL" default:"postgresql://postgres:postgres@localhost:5432/postgres"`
	MaxOpenConns int    `envconfig:"DB_MAX_OPEN_CONNS" default:"16"`
}

Jump to

Keyboard shortcuts

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