From 7c70d2ca1f4c31d10b186729a4f84ff2e7d1cdea Mon Sep 17 00:00:00 2001 From: "jackdaw@loafle.com" Date: Fri, 28 Apr 2017 11:39:17 +0900 Subject: [PATCH] ConfigManager implements --- config_manager.go | 4 ++-- config_manager_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config_manager.go b/config_manager.go index 57a1499..d4853c6 100644 --- a/config_manager.go +++ b/config_manager.go @@ -188,9 +188,9 @@ func (c *configManager) removeConfig() { func (c *configManager) GetGlobalConfig() *config_manager.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] } -func (c *configManager) GetCrawlers() map[string] *config_manager.Config { +func (c *configManager) GetSensors() map[string] *config_manager.Config { return c.configs } diff --git a/config_manager_test.go b/config_manager_test.go index 5a2836b..7fb60e9 100644 --- a/config_manager_test.go +++ b/config_manager_test.go @@ -21,7 +21,7 @@ func TestLoadConfig(t *testing.T) { go func() { data :=<- ch c := data.(config_manager.ConfigManager) - cc := c.GetCrawlers() + cc := c.GetSensors() //ccc := cc["75045c53-a78d-4589-b8c1-4482cab720b6"] //