sd
This commit is contained in:
parent
5b9d23fdaa
commit
624e73c186
|
@ -73,6 +73,10 @@ func Start(ch chan bool) (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Stop() (err error) {
|
||||||
|
es := GetInstance()
|
||||||
|
es.stop()
|
||||||
|
}
|
||||||
func AddEventData(event interface{}) {
|
func AddEventData(event interface{}) {
|
||||||
es := GetInstance()
|
es := GetInstance()
|
||||||
es.lq.PushItem(event)
|
es.lq.PushItem(event)
|
||||||
|
@ -92,7 +96,7 @@ func (es *EventSender) start() {
|
||||||
go es.checkQueue()
|
go es.checkQueue()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (es *EventSender) Stop() {
|
func (es *EventSender) stop() {
|
||||||
if es.sc != nil {
|
if es.sc != nil {
|
||||||
es.lq.Close()
|
es.lq.Close()
|
||||||
close(es.sc)
|
close(es.sc)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user