nats

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 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 added in v1.1.0

func (s *DurableSub) Close() error

func (*DurableSub) Unsubscribe added in v1.1.0

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 added in v1.1.0

type Option func(c *RxNatsClient)

func WhenConnected added in v1.1.0

func WhenConnected(handler connectionHandler) Option

func WhenDisconnected added in v1.1.0

func WhenDisconnected(handler disconnectionHandler) Option

func WhenError added in v1.1.0

func WhenError(handler errorHandler) Option

type RxNatsClient added in v1.1.0

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

func NewRxNatsClient added in v1.1.0

func NewRxNatsClient(opts ...Option) *RxNatsClient

func (*RxNatsClient) Close added in v1.1.0

func (c *RxNatsClient) Close() error

func (*RxNatsClient) ReceiveConfiguration added in v1.1.0

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

func (*RxNatsClient) Visit added in v1.1.0

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