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 SetFrom(name string) error
- 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" )
Variables ¶
This section is empty.
Functions ¶
func Data ¶ added in v1.1.0
* * Data * @param string channel * @param func(Message) reciveFn * @return error *
func HttpEventWork ¶ added in v1.1.0
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 Source ¶ added in v1.1.0
* * Source * @param string channel * @param func(Message) reciveFn * @return error *
func Stack ¶ added in v1.1.0
* * 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 TokenLastUse ¶ added in v1.1.0
* * TokenLastUse * @param data et.Json *
func Unsubscribe ¶
func Unsubscribe(channel string)
* * Unsubscribe to a channel * @param channel string *
Types ¶
This section is empty.