Documentation
¶
Index ¶
- Constants
- func ConnectClose()
- func GetMsg() *nats.Msg
- func GetTimeout(tod ...time.Duration) time.Duration
- func NewPool(replySubject string, config cfacade.ProfileJSON, isConnect bool)
- func ReconnectDelay() time.Duration
- func ReleaseMsg(msg *nats.Msg)
- type Connect
- func (p *Connect) Address() string
- func (p *Connect) Close()
- func (p *Connect) Connect()
- func (p *Connect) GetID() int
- func (p *Connect) MaxReconnects() int
- func (p *Connect) QueueSubscribe(subject, queue string, cb nats.MsgHandler) error
- func (p *Connect) Request(subject string, data []byte, tod ...time.Duration) ([]byte, error)
- func (p *Connect) RequestSync(subject string, data []byte, tod ...time.Duration) ([]byte, error)
- func (p *Connect) Subs() []*nats.Subscription
- func (p *Connect) Subscribe(subject string, cb nats.MsgHandler) error
- type OptionFunc
Constants ¶
View Source
const (
REQ_ID = "reqID"
)
Variables ¶
This section is empty.
Functions ¶
func ConnectClose ¶ added in v1.4.4
func ConnectClose()
func NewPool ¶ added in v1.4.4
func NewPool(replySubject string, config cfacade.ProfileJSON, isConnect bool)
func ReconnectDelay ¶ added in v1.4.4
func ReleaseMsg ¶ added in v1.4.4
Types ¶
type Connect ¶ added in v1.4.4
func GetConnect ¶ added in v1.4.4
func GetConnect() *Connect
func NewConnect ¶ added in v1.4.4
func NewConnect(id int, replySubject string, opts ...OptionFunc) *Connect
func (*Connect) MaxReconnects ¶ added in v1.4.4
func (p *Connect) MaxReconnects() int
func (*Connect) QueueSubscribe ¶ added in v1.4.4
func (p *Connect) QueueSubscribe(subject, queue string, cb nats.MsgHandler) error
func (*Connect) RequestSync ¶ added in v1.4.4
func (*Connect) Subs ¶ added in v1.4.8
func (p *Connect) Subs() []*nats.Subscription
type OptionFunc ¶
type OptionFunc func(o *options)
func WithAddress ¶
func WithAddress(address string) OptionFunc
func WithAuth ¶
func WithAuth(user, password string) OptionFunc
func WithIsStats ¶ added in v1.4.4
func WithIsStats(isStats bool) OptionFunc
func WithParams ¶
func WithParams(maxReconnects int) OptionFunc
Click to show internal directories.
Click to hide internal directories.