nats

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageQueue

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

func NewMessageQueue

func NewMessageQueue(logger *zap.Logger, address string) (*MessageQueue, error)

func (*MessageQueue) Publish

func (m *MessageQueue) Publish(topic string, pOpts ...miface.PubOption) error

func (*MessageQueue) Subscribe

func (m *MessageQueue) Subscribe(
	ctx context.Context,
	topic string,
	handler miface.SubResponseHandler,
	sOpts ...miface.SubOption,
) (miface.Subscription, error)

type Subscription

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

func NewSubscription

func NewSubscription(
	ctx context.Context,
	topic string,
	conn *nats.Conn,
	deliverySemantics common.DeliverySemantics,
	queue string,
	handler miface.SubResponseHandler,
) (*Subscription, error)

func (*Subscription) IsValid

func (s *Subscription) IsValid() bool

func (*Subscription) Unsubscribe

func (s *Subscription) Unsubscribe() error

Jump to

Keyboard shortcuts

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