config

package
v0.0.0-...-205e723 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server   ServerConfig
	Database DatabaseConfig
}

func New

func New() *Config

New returns a new Config struct

type DatabaseConfig

type DatabaseConfig struct {
	Connector string `envconfig:"MONGO_CONNECTOR" default:"mongodb://USER:PASS@localhost:27017/db"`
}

type ServerConfig

type ServerConfig struct {
	Port          string `envconfig:"SERVER_PORT" default:"8000"`
	LogLevel      string `envconfig:"LOG_LEVEL" default:"InfoLevel"`
	HealthPort    string `envconfig:"HEALTH_PORT" default:"9000"`
	MetricsPort   string `envconfig:"METRICS_PORT" default:"9123"`
	MaxCPU        string `envconfig:"MAX_CPU"`
	RequestCPU    string `envconfig:"REQ_CPU"`
	MaxMemory     string `envconfig:"MAX_MEMORY"`
	RequestMemory string `envconfig:"REQ_MEMORY"`
}

Jump to

Keyboard shortcuts

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