nats

package module
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(url string, options ...nats.Option) (queue.MessageQueueProvider, error)

Types

type Provider

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

func NewNatsProvider

func NewNatsProvider(url string, options ...nats.Option) (*Provider, error)

func (*Provider) Close

func (p *Provider) Close() error

func (*Provider) MessageQueue

func (p *Provider) MessageQueue(subject string) (queue.MessageQueue, error)

func (*Provider) PublishToTopic

func (p *Provider) PublishToTopic(ctx context.Context, topic string, payload string) error

func (*Provider) QueueSubscribe

func (p *Provider) QueueSubscribe(ctx context.Context, subject string, handler func(queue.DeliverMessage)) (queue.Subscription, error)

func (*Provider) RequestReply

func (p *Provider) RequestReply(ctx context.Context, topic string, payload string) (*queue.Message, error)

func (*Provider) SubscribeToTopic

func (p *Provider) SubscribeToTopic(ctx context.Context, topic string, handler func(queue.DeliverMessage)) (queue.Subscription, error)

type Setting

type Setting settings.Setting[*nats.Options]

Jump to

Keyboard shortcuts

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