config

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Environment     string
	LogLevel        string `envconfig:"LOG_LEVEL" default:"DEBUG"`
	PG              PGConfig
	Nats            NatsConfig
	Rpc             rpc.RpcConfig
	Web             web.WebConfig
	Otel            OtelConfig
	ShutdownTimeout time.Duration `envconfig:"SHUTDOWN_TIMEOUT" default:"30s"`
}

func InitConfig

func InitConfig() (cfg AppConfig, err error)

type NatsConfig

type NatsConfig struct {
	URL    string `required:"true"`
	Stream string `default:"intellimall"`
}

type OtelConfig

type OtelConfig struct {
	ServiceName      string `envconfig:"SERVICE_NAME" default:"intellimall"`
	ExporterEndpoint string `envconfig:"EXPORTER_OTLP_ENDPOINT" default:"http://collector:4317"`
}

type PGConfig

type PGConfig struct {
	Conn string `required:"true"`
}

Jump to

Keyboard shortcuts

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