Documentation ¶
Index ¶
- Constants
- func Close()
- func Data(channel string, data et.Json) error
- func From() et.Json
- func HttpEventWork(w http.ResponseWriter, r *http.Request)
- func Load() (*ws.Client, error)
- func Log(event string, data et.Json)
- func Overflow(data et.Json)
- func Ping()
- func Publish(channel string, message interface{}) error
- func Queue(channel, queue string, reciveFn func(ws.Message))
- func SendMessage(clientId string, message interface{}) error
- func SetDirectMessageCallback(reciveFn func(ws.Message))
- func SetFrom(name string) error
- func SetReconnectCallback(reciveFn func(c *ws.Client))
- func Source(channel string, reciveFn func(ws.Message)) error
- func Stack(channel string, reciveFn func(ws.Message))
- func Subscribe(channel string, reciveFn func(ws.Message)) error
- func Telemetry(data et.Json)
- func TokenLastUse(data et.Json)
- func Unsubscribe(channel string)
- func Work(event string, data et.Json) et.Json
- func WorkState(work_id string, status event.WorkStatus, data et.Json)
Constants ¶
const ( ERR_NOT_CONNECT_WS = "Not connect to the websocket" ERR_INVALID_ID = "Invalid id" ERR_INVALID_NAME = "Invalid name" MSG_RT_HOST_REQUIRED = "RT_HOST required" MSG_RT_AUTH_REQUIRED = "RT_AUTH required" )
const ServiceName = "Real Time"
Variables ¶
This section is empty.
Functions ¶
func HttpEventWork ¶
func HttpEventWork(w http.ResponseWriter, r *http.Request)
* * HttpEventWork * @param w http.ResponseWriter * @param r *http.Request *
func Publish ¶
* * Publish a message to a channel * @param channel string * @param message interface{} *
func Queue ¶
* * Queue to a channel * @param channel string * @param reciveFn func(message.ws.Message) *
func SendMessage ¶
* * SendMessage * @param clientId string * @param message interface{} * @return error *
func SetDirectMessageCallback ¶
* * SetDirectMessageCallback * @param reciveFn func(ws.Message) *
func SetReconnectCallback ¶
* * SetReconnectCallback * @param reciveFn func(ws.Client) *
func Stack ¶
* * Stack to a channel * @param channel string * @param reciveFn func(message.ws.Message) *
func Subscribe ¶
* * Subscribe to a channel * @param channel string * @param reciveFn func(message.ws.Message) *
func Unsubscribe ¶
func Unsubscribe(channel string)
* * Unsubscribe to a channel * @param channel string *
Types ¶
This section is empty.