21 lines
460 B
Go
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)
|
|
}
|