ConfigManager implements

This commit is contained in:
jackdaw@loafle.com 2017-04-28 11:39:17 +09:00
parent 297afd4dc1
commit 7c70d2ca1f
2 changed files with 3 additions and 3 deletions

View File

@ -188,9 +188,9 @@ func (c *configManager) removeConfig() {
func (c *configManager) GetGlobalConfig() *config_manager.GlobalConfig { func (c *configManager) GetGlobalConfig() *config_manager.GlobalConfig {
return &c.globalConfig return &c.globalConfig
} }
func (c *configManager) GetCrawlerById(id string) *config_manager.Config { func (c *configManager) GetSensorById(id string) *config_manager.Config {
return c.configs[id] return c.configs[id]
} }
func (c *configManager) GetCrawlers() map[string] *config_manager.Config { func (c *configManager) GetSensors() map[string] *config_manager.Config {
return c.configs return c.configs
} }

View File

@ -21,7 +21,7 @@ func TestLoadConfig(t *testing.T) {
go func() { go func() {
data :=<- ch data :=<- ch
c := data.(config_manager.ConfigManager) c := data.(config_manager.ConfigManager)
cc := c.GetCrawlers() cc := c.GetSensors()
//ccc := cc["75045c53-a78d-4589-b8c1-4482cab720b6"] //ccc := cc["75045c53-a78d-4589-b8c1-4482cab720b6"]
// //