config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfiguration

func LoadConfiguration()

LoadConfiguration loads configuration from a JSON file and environment variables.

Types

type AppConfig

type AppConfig struct {
	ConfigFile           string          `json:"configFile"`
	Debug                bool            `json:"debug"`
	MetricsPort          int             `json:"metricsPort"`
	AdminPort            int             `json:"adminPort"`
	BackendServer        string          `json:"backendServer"`
	BackendPort          int             `json:"backendPort"`
	BackendHealthCheck   string          `json:"backendHealthCheck"`
	BackendTimeoutMs     int             `json:"backendTimeoutMs"`
	FrontendPort         int             `json:"frontendPort"`
	CacheMaxSize         int             `json:"cacheMaxSize"`
	CacheableMIMETypes   map[string]bool `json:"cacheableMIMETypes"`
	NonCacheablePatterns []string        `json:"nonCacheablePatterns"`
}

AppConfig structure combines both file-based and environment-based configurations.

var CFG AppConfig

Jump to

Keyboard shortcuts

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