Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedConfig ¶
type AdvancedConfig struct { PingMessage string `yaml:"ping_message"` PostgresHost string `yaml:"postgres_host"` }
AdvancedConfig holds advanced application's configuration
type Config ¶
type Config struct {
Advanced AdvancedConfig `yaml:"advanced"`
}
Config is the struct that holds our application's configuration
func UnmarshalConfig ¶
UnmarshalConfig unmarshalls file bytes to advanced config
type MutexConfigManager ¶
type MutexConfigManager struct {
// contains filtered or unexported fields
}
MutexConfigManager manages the configuration instance by preforming locking around access to the Config struct.
func InitAdvancedConfig ¶
func InitAdvancedConfig() (*MutexConfigManager, *config.FileWatcher, error)
InitAdvancedConfig inits config
func NewMutexConfigManager ¶
func NewMutexConfigManager(conf *AdvancedConfig) *MutexConfigManager
NewMutexConfigManager constructs new MutexConfigManager
func (*MutexConfigManager) Get ¶
func (m *MutexConfigManager) Get() *AdvancedConfig
Get returns current config
func (*MutexConfigManager) Set ¶
func (m *MutexConfigManager) Set(confBytes []byte) error
Set sets new config
Click to show internal directories.
Click to hide internal directories.