Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvPrefix = "MO" MonitorablePrefix = "MONITORABLE" ConfigPrefix = "CONFIG" DefaultConfigName ConfigName = "default" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigName ¶
type ConfigName string
type CoreConfig ¶
type CoreConfig struct { // --- General Configuration --- Port int Address string DisableUI bool // --- Cache Configuration --- // UpstreamCacheExpiration is used to respond before executing the request. Avoid overloading services. UpstreamCacheExpiration int // DownstreamCacheExpiration is used to respond after executing the request in case of timeout error. DownstreamCacheExpiration int // InitialMaxDelay is used to add delay on first method to avoid bursting x requests in same time on start InitialMaxDelay int // in Millisecond // NamedConfig can contains ui config (path or url) // Can contains default or named config file // Like: // MO_CONFIG=./default.json // MO_CONFIG_SCREEN1=./screen1.json // MO_CONFIG_SCREEN2=https://config.example.com/screen2.json // // Note: it's the only way to load config file outside of monitoror directory NamedConfigs map[ConfigName]string }
NamedConfig contain backend Configuration
func InitConfig ¶
func InitConfig() *CoreConfig
InitConfig from configuration file / env / default value
Click to show internal directories.
Click to hide internal directories.