data_sender_go/data_sender_event.go
insanity@loafle.com 3aff00acc5 data_sender
2017-05-11 20:07:31 +09:00

21 lines
470 B
Go

package data_sender_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)
startDataSender(ch)
//observer.Remove(messages.CFG_LOADED, ch)
}
func (ds *DataSender) handleAgentStop() {
ch := make(chan interface{}, 0)
observer.Add(messages.AGT_STOPPED, ch)
ds.Stop()
//observer.Remove(messages.AGT_STOPPED, ch)
}