a4b2278dfd
address
27 lines
347 B
Go
27 lines
347 B
Go
package communicate
|
|
|
|
import (
|
|
"fmt"
|
|
"git.loafle.net/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 GetRootURL() string {
|
|
return _c.RootURL
|
|
}
|
|
|
|
func Send(e *events.Event) {
|
|
_c.addEvent(e)
|
|
}
|