agent/agent.go
2017-05-11 19:29:32 +09:00

44 lines
784 B
Go

package main
import (
"loafle.com/overflow/agent_api/observer"
"loafle.com/overflow/agent_api/observer/messages"
_ "loafle.com/overflow/config_manager_go"
_ "loafle.com/overflow/crawler_manager_go"
_ "loafle.com/overflow/collector_go"
_ "loafle.com/overflow/data_sender_go"
_ "loafle.com/overflow/event_sender"
_ "loafle.com/overflow/long_poller_go"
"time"
"sync"
"log"
)
func main() {
log.SetPrefix("Agent : ")
initAgent()
}
func initAgent() {
log.Println("initAgent")
observer.Notify(messages.AGT_STARTING, "/home/snoop/develop/path/go/src/loafle.com/overflow/config_manager_go/test_agent/")
log.Println("AGT_STARTING after")
time.Sleep(time.Second * 2)
observer.Notify(messages.AGT_INITIALIZED, "")
wg := sync.WaitGroup{}
wg.Add(1)
wg.Wait()
}