long_poller_go/poller_event.go
insanity@loafle.com 37b37b5870 long poller
2017-05-11 20:07:05 +09:00

21 lines
460 B
Go

package long_poller_go
import (
"loafle.com/overflow/agent_api/observer"
"loafle.com/overflow/agent_api/observer/messages"
)
func handleConfigLoaded() {
ch := make(chan interface{}, 0)
observer.Add(messages.CFG_LOADED, ch)
startPoller(ch)
//observer.Remove(messages.CFG_LOADED, ch)
}
func (p *Poller) handleAgentStop() {
ch := make(chan interface{}, 0)
observer.Add(messages.AGT_STOPPED, ch)
p.Stop()
//observer.Remove(messages.AGT_STOPPED, ch)
}