config

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 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"`
	DatasourceSnapshotAddress string `env:"INTERNAL_API_DATASOURCE_SNAPSHOT_ADDRESS" envDefault:"localhost:11100"`
	EnsResolverAddress        string `env:"INTERNAL_API_ENS_RESOLVER_ADDRESS" envDefault:":20200"`
}

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