Documentation ¶
Index ¶
- func Init(url string) (err error)
- func Push(serviceCode string, topic string, data []byte) (err error)
- func PushData(serviceCode string, topic string, action string, id int64, mark string, ...) (err error)
- func PushDataNoErr(serviceCode string, topic string, action string, id int64, mark string, ...)
- func PushJson(serviceCode string, topic string, data interface{}) (err error)
- func PushJsonNoErr(serviceCode string, 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(serviceCode string, topic string, cb func(msg *nats.Msg)) (err error)
- func SubData(serviceCode string, topic string, ...) (err error)
- func SubDataByte(serviceCode string, topic string, ...) (err error)
- func SubDataByteNoErr(serviceCode string, topic string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PushData ¶
func PushData(serviceCode string, topic string, action string, id int64, mark string, data interface{}) (err error)
PushData 发送数据包
func PushDataNoErr ¶
func PushDataNoErr(serviceCode string, topic string, action string, id int64, mark string, data interface{})
PushDataNoErr 发送数据包无错误
func PushJsonNoErr ¶
func ReflectData ¶
func ReflectData(mapData interface{}, rawData interface{}) (err error)
ReflectData 反射结构体
func ReflectDataByte ¶
ReflectDataByte 反射结构体
func SubData ¶
func SubData(serviceCode string, 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.