communicate/communicate.go

27 lines
343 B
Go
Raw Normal View History

2016-11-28 05:13:15 +00:00
package communicate
import (
"fmt"
"loafle.com/commons/communicate/events"
)
var _c *communicator = nil
func init() {
fmt.Println("init communicator")
_c = NewCommunicator()
_c.start()
}
2016-11-28 05:43:22 +00:00
func SetRootURL(url string) {
_c.RootURL = url
}
2016-11-28 06:00:12 +00:00
func GetRootURL() string {
return _c.RootURL
}
2016-11-28 05:13:15 +00:00
func Send(e *events.Event) {
_c.addEvent(e)
}