nats

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Infinity    = math.MaxInt32
	MinAttempts = 4
)

Variables

View Source
var (
	ErrNotConnected = errors.New("nats: not connected")
)

Functions

This section is empty.

Types

type DurableSub

type DurableSub struct {
	stan.Subscription
	// contains filtered or unexported fields
}

func (*DurableSub) Close

func (s *DurableSub) Close() error

func (*DurableSub) Unsubscribe

func (s *DurableSub) Unsubscribe() error

type NatsClient

type NatsClient struct {
	stan.Conn
	// contains filtered or unexported fields
}

func NewNatsStreamingServerClient

func NewNatsStreamingServerClient(
	natsConfig structure.NatsConfig,
	disconnectionHandler disconnectionHandler,
	connectionHandler connectionHandler,
	errorHandler errorHandler,
) (*NatsClient, error)

func (*NatsClient) Close

func (c *NatsClient) Close() error

func (*NatsClient) MakeDurableQueueSubscription

func (c *NatsClient) MakeDurableQueueSubscription(subject string, handler stan.MsgHandler) (stan.Subscription, error)

type Option

type Option func(c *RxNatsClient)

func WhenConnected

func WhenConnected(handler connectionHandler) Option

func WhenDisconnected

func WhenDisconnected(handler disconnectionHandler) Option

func WhenError

func WhenError(handler errorHandler) Option

type RxNatsClient

type RxNatsClient struct {
	// contains filtered or unexported fields
}

func NewRxNatsClient

func NewRxNatsClient(opts ...Option) *RxNatsClient

func (*RxNatsClient) Close

func (c *RxNatsClient) Close() error

func (*RxNatsClient) ReceiveConfiguration

func (c *RxNatsClient) ReceiveConfiguration(clientId string, cfg structure.NatsConfig)

func (*RxNatsClient) Visit

func (c *RxNatsClient) Visit(visitor func(c *NatsClient) error) error

Jump to

Keyboard shortcuts

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