Documentation ¶
Index ¶
- Constants
- func Close()
- func From() et.Json
- func IsConnected() bool
- func Load() error
- func Ping()
- func Publish(channel string, message interface{})
- func Queue(channel, queue string, reciveFn func(ws.Message))
- func SendMessage(clientId string, message interface{}) error
- func SetFrom(name string) error
- func Subscribe(channel string, reciveFn func(ws.Message))
- func Unsubscribe(channel string)
- type ClientWS
Constants ¶
View Source
const ( ERR_NOT_CONNECT_WS = "Not connect to the websocket" ERR_INVALID_ID = "Invalid id" ERR_INVALID_NAME = "Invalid name" )
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load() error
* * ConnectWs connect to the server using the websocket * @param host string * @param scheme string * @param clientId string * @param name string * @return *websocket.Conn * @return error *
func Publish ¶
func Publish(channel string, message interface{})
* * 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 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 ¶
Click to show internal directories.
Click to hide internal directories.