23 lines
294 B
Go
23 lines
294 B
Go
package communicate
|
|
|
|
import (
|
|
"fmt"
|
|
"loafle.com/commons/communicate/events"
|
|
)
|
|
|
|
var _c *communicator = nil
|
|
|
|
func init() {
|
|
fmt.Println("init communicator")
|
|
_c = NewCommunicator()
|
|
_c.start()
|
|
}
|
|
|
|
func SetRootURL(url string) {
|
|
_c.RootURL = url
|
|
}
|
|
|
|
func Send(e *events.Event) {
|
|
_c.addEvent(e)
|
|
}
|