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 ¶
func ConnectClose()
func ReconnectDelay ¶
func ReleaseMsg ¶
Types ¶
type Connect ¶
func GetConnect ¶
func GetConnect() *Connect
func NewConnect ¶
func NewConnect(id int, replySubject string, opts ...OptionFunc) *Connect
func (*Connect) MaxReconnects ¶
func (p *Connect) MaxReconnects() int
func (*Connect) QueueSubscribe ¶
func (p *Connect) QueueSubscribe(subject, queue string, cb nats.MsgHandler) error
func (*Connect) RequestSync ¶
func (*Connect) Subs ¶
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 ¶
func WithIsStats(isStats bool) OptionFunc
func WithParams ¶
func WithParams(maxReconnects int) OptionFunc
Click to show internal directories.
Click to hide internal directories.