Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ENV_CONFIG name of conf file path env variable ENV_CONFIG = "SAHC_CONFIG" // DB_NAME Leveldb name DB_NAME = "storage_level" // CONF_KEY Configuration key name CONF_KEY = "CONF_KEY" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { Version float64 `yaml:"version";json:"version"` Services []Services `yaml:"services";json:"services"` }
Configuration is used to parse and use config.yaml
func (Configuration) GetConfiguration ¶
func (conf Configuration) GetConfiguration(db *leveldb.DB) (*Configuration, error)
GetConfiguration is used to get configuration from leveldb
func (*Configuration) SaveConfigurations ¶
func (conf *Configuration) SaveConfigurations(db *leveldb.DB) error
SaveConfigurations is used to Save the conf instance to leveldb
func (*Configuration) UpdateStatus ¶
UpdateStatus is used to update the health availability status of service
type HealthJobs ¶
type HealthJobs struct { // Running is the channel to stop the worker Running chan bool }
HealthJobs is used to track the active running workers
Click to show internal directories.
Click to hide internal directories.