Documentation ¶
Index ¶
- func Init(url string) (err error)
- func Push(topic string, data []byte) (err error)
- func PushData(topic string, action string, id int64, mark string, data interface{}) (err error)
- func PushDataNoErr(topic string, action string, id int64, mark string, data interface{})
- func PushJson(topic string, data interface{}) (err error)
- func PushJsonNoErr(topic string, data interface{})
- func ReflectData(mapData interface{}, rawData interface{}) (err error)
- func ReflectDataByte(mapData []byte, rawData interface{}) (err error)
- func SetSubPrefix(prefix string)
- func Sub(topic string, cb func(msg *nats.Msg)) (err error)
- func SubData(topic string, ...) (err error)
- func SubDataByte(topic string, ...) (err error)
- func SubDataByteNoErr(topic string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PushDataNoErr ¶
PushDataNoErr 发送数据包无错误
func PushJsonNoErr ¶
func PushJsonNoErr(topic string, data interface{})
func ReflectData ¶
func ReflectData(mapData interface{}, rawData interface{}) (err error)
ReflectData 反射结构体
func ReflectDataByte ¶
ReflectDataByte 反射结构体
func SubData ¶
func SubData(topic string, cb func(msg *nats.Msg, action string, id int64, mark string, data interface{})) (err error)
SubData 订阅数据包
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.