config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGroupName

func GenerateGroupName(subgroup string) string

Types

type App

type App struct {
	LogLevel    string `env:"LOG_LEVEL" envDefault:"info"`
	Prometheus  Prometheus
	Health      Health
	Nats        Nats
	DB          DB
	InternalAPI InternalAPI
}

type DB

type DB struct {
	DSN                string `env:"POSTGRES_DSN" envDefault:"host=localhost port=5432 user=postgres password=DB_PASSWORD dbname=postgres sslmode=disable"`
	MaxOpenConnections int    `env:"POSTGRES_MAX_OPEN_CONNECTIONS" envDefault:"30"`
	Debug              bool   `env:"POSTGRES_DEBUG" envDefault:"false"`
}

type Health

type Health struct {
	Listen string `env:"HEALTH_LISTEN" envDefault:":3000"`
}

type InternalAPI

type InternalAPI struct {
	Bind string `env:"INTERNAL_API_GRPC_SERVER_BIND" envDefault:":11000"`
}

type Nats

type Nats struct {
	URL              string        `env:"NATS_URL" envDefault:"nats://127.0.0.1:4222"`
	MaxReconnects    int           `env:"NATS_MAX_RECONNECTS" envDefault:"10"`
	ReconnectTimeout time.Duration `env:"NATS_RECONNECT_TIMEOUT" envDefault:"1s"`
}

type Prometheus

type Prometheus struct {
	Listen string `env:"PROMETHEUS_LISTEN" envDefault:":2112"`
}

Jump to

Keyboard shortcuts

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