rt

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_NOT_CONNECT_WS  = "Not connect to the websocket"
	ERR_INVALID_ID      = "Invalid id"
	ERR_INVALID_NAME    = "Invalid name"
	MSG_RT_URL_REQUIRED = "RT_URL required"
)

Variables

This section is empty.

Functions

func Close

func Close()

* * Close *

func Data added in v1.1.0

func Data(channel string, data et.Json) error

* * Data * @param string channel * @param func(Message) reciveFn * @return error *

func From

func From() et.Json

* * From * @return et.Json *

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 Load

func Load() (*ws.Client, error)

* * LoadFrom * @return erro *

func Log added in v1.1.0

func Log(event string, data et.Json)

* * Log * @param event string * @param data et.Json *

func Overflow added in v1.1.0

func Overflow(data et.Json)

* * Overflow * @param data et.Json *

func Ping

func Ping()

* * Ping *

func Publish

func Publish(channel string, message interface{}) error

* * Publish a message to a channel * @param channel string * @param message interface{} *

func Queue

func Queue(channel, queue string, reciveFn func(ws.Message))

* * Queue to a channel * @param channel string * @param reciveFn func(message.ws.Message) *

func SendMessage

func SendMessage(clientId string, message interface{}) error

* * SendMessage * @param clientId string * @param message interface{} * @return error *

func SetFrom

func SetFrom(name string) error

* * SetFrom * @param params et.Json * @return error *

func Source added in v1.1.0

func Source(channel string, reciveFn func(ws.Message)) error

* * Source * @param string channel * @param func(Message) reciveFn * @return error *

func Stack added in v1.1.0

func Stack(channel string, reciveFn func(ws.Message))

* * Stack to a channel * @param channel string * @param reciveFn func(message.ws.Message) *

func Subscribe

func Subscribe(channel string, reciveFn func(ws.Message)) error

* * Subscribe to a channel * @param channel string * @param reciveFn func(message.ws.Message) *

func Telemetry added in v1.1.0

func Telemetry(data et.Json)

* * Telemetry * @param data et.Json *

func TokenLastUse added in v1.1.0

func TokenLastUse(data et.Json)

* * TokenLastUse * @param data et.Json *

func Unsubscribe

func Unsubscribe(channel string)

* * Unsubscribe to a channel * @param channel string *

func Work added in v1.1.0

func Work(event string, data et.Json) et.Json

* * Work * @param event string * @param data et.Json *

func WorkState added in v1.1.0

func WorkState(work_id string, status event.WorkStatus, data et.Json)

* * WorkState * @param work_id string * @param status WorkStatus * @param data et.Json *

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL