cherryNats

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

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) Address

func (p *Conn) Address() string

func (*Conn) ChanExecute

func (p *Conn) ChanExecute(subject string, msgChan chan *nats.Msg, process func(msg *nats.Msg))

func (*Conn) Close

func (p *Conn) Close()

func (*Conn) Connect

func (p *Conn) Connect()

func (*Conn) MaxReconnects

func (p *Conn) MaxReconnects() int

func (*Conn) ReconnectDelay

func (p *Conn) ReconnectDelay() time.Duration

func (*Conn) Request

func (p *Conn) Request(subj string, data []byte, timeout ...time.Duration) (*nats.Msg, error)

func (*Conn) RequestTimeout

func (p *Conn) RequestTimeout() time.Duration

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL