Documentation ¶
Overview ¶
Package mconfig provides gateway Go support for cloud managed configuration (mconfig) Managed Configs are stored in proto JSON marshaled form in gateway.mconfig by external process (magmad) and periodically (MCONFOG_REFRESH_INTERVAL) refreshed by a dedicated routine
Package mconfig provides gateway Go support for cloud managed configuration (mconfig)
Package mconfig provides gateway Go support for cloud managed configuration (mconfig)
Index ¶
- Constants
- func ConfigFilePath() string
- func CreateLoadTempConfig(configJSON string) error
- func DefaultConfigFilePath() string
- func GetGatewayConfigs() *protos.GatewayConfigs
- func GetServiceConfigs(service string, result proto.Message) error
- func Info() (fullPath string, fileInfo os.FileInfo)
- func RefreshConfigs() (string, error)
- func RefreshConfigsFrom(mcpath string) error
- func StopRefreshTicker()
Constants ¶
const ( DefaultConfigFileDir = "/etc/magma" DefaultDynamicConfigFileDir = "/var/opt/magma/configs" ConfigFileDirEnv = "MAGMA_CONFIG_LOCATION" MconfigFileName = "gateway.mconfig" MconfigRefreshInterval = time.Second * 120 )
Variables ¶
This section is empty.
Functions ¶
func ConfigFilePath ¶
func ConfigFilePath() string
ConfigFilePath returns current GW mconfig file path
func CreateLoadTempConfig ¶
func DefaultConfigFilePath ¶
func DefaultConfigFilePath() string
DefaultConfigFilePath returns default GW mconfig file path
func GetGatewayConfigs ¶
func GetGatewayConfigs() *protos.GatewayConfigs
func RefreshConfigs ¶
RefreshConfigs checks if Managed Config File's path or content has changed and tries to reload mamaged configs from the file refreshConfigs is thread safe and can be safely called while current configs are in use by other threads/routines
func RefreshConfigsFrom ¶
RefreshConfigsFrom checks if Managed Config File mcpath has changed and tries to reload mamaged configs from the file RefreshConfigsFrom is thread safe and can be safely called while current configs are in use by other threads/routines
Types ¶
This section is empty.