configs

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFilePathEnvName = "CONFIG_FILE_PATH"

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(namespace string, app string, configFilePath string, envFilePath string) func() (*Config, error)

Types

type APIServer

type APIServer struct {
	GrpcServerAddr string `json:"grpc_server_addr" yaml:"grpc_server_addr"`
	HttpServerAddr string `json:"http_server_addr" yaml:"http_server_addr"`
}

type Config

type Config struct {
	meta.Meta `json:"-" yaml:"-"`

	Env       string    `json:"env" yaml:"env"`
	Tracing   Tracing   `json:"tracing" yaml:"tracing"`
	APIServer APIServer `json:"api_server" yaml:"api_server"`
	Factorio  Factorio  `json:"factorio" yaml:"factorio"`
}

func NewTestConfig

func NewTestConfig(envFilePath string) (*Config, error)

type Factorio

type Factorio struct {
	RCONHost     string `json:"rcon_host" yaml:"rcon_host"`
	RCONPort     string `json:"rcon_port" yaml:"rcon_port"`
	RCONPassword string `json:"rcon_password" yaml:"rcon_password"`
}

type Tracing

type Tracing struct {
	OtelCollectorHTTP bool `json:"otel_collector_http" yaml:"otel_collector_http"`
	OtelStdoutEnabled bool `json:"otel_stdout_enabled" yaml:"otel_stdout_enabled"`
}

Jump to

Keyboard shortcuts

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