Documentation ¶
Index ¶
- type Conn
- func (p *Conn) Address() string
- func (p *Conn) ChanExecute(subject string, msgChan chan *nats.Msg, process func(msg *nats.Msg))
- func (p *Conn) Close()
- func (p *Conn) Connect()
- func (p *Conn) MaxReconnects() int
- func (p *Conn) ReconnectDelay() time.Duration
- func (p *Conn) Request(subj string, data []byte, timeout ...time.Duration) (*nats.Msg, error)
- func (p *Conn) RequestTimeout() time.Duration
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct { *nats.Conn // contains filtered or unexported fields }
func New ¶
func New(opts ...OptionFunc) *Conn
func (*Conn) ChanExecute ¶
func (*Conn) MaxReconnects ¶
func (p *Conn) MaxReconnects() int
func (*Conn) ReconnectDelay ¶
func (*Conn) RequestTimeout ¶
type OptionFunc ¶
type OptionFunc func(o *options)
func WithAddress ¶
func WithAddress(address string) OptionFunc
func WithAuth ¶
func WithAuth(user, password string) OptionFunc
func WithParams ¶
func WithParams(maxReconnects int, reconnectDelay int, requestTimeout int) OptionFunc
Click to show internal directories.
Click to hide internal directories.