Documentation ¶
Index ¶
- Constants
- func CreateDefaultPool(config *Config) error
- func NewStarter() *starter
- func XCommonNatsChan() *commonNatsChan
- func XCommonNatsPubSub() *commonNatsPubSub
- func XCommonNatsQueue() *commonNatsQueue
- func XCommonNatsRequest() *commonNatsRequest
- func XF(f func(c *nats.Conn) error) error
- type Config
- type DialFunc
- type EncodedMsgHandler
- type NatsPool
Constants ¶
View Source
const DefaultConnSize = 20
默认初始的连接数
Variables ¶
This section is empty.
Functions ¶
func CreateDefaultPool ¶
func NewStarter ¶
func NewStarter() *starter
Types ¶
type Config ¶
type Config struct {
NatsServers []natsServer
}
Nats Mq 消息系统
func DefaultConfig ¶
func DefaultConfig() *Config
type EncodedMsgHandler ¶
type EncodedMsgHandler func(subject string, goDataMsg interface{})
接收已编码消息的订阅,用于订阅发布go类型数据消息的主题 除接收处理函数不同,其他都一样,请自定义接收消息的数据类型,消息用json编码发送
Click to show internal directories.
Click to hide internal directories.