nats

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteConsumer

func DeleteConsumer(ctx context.Context, jc *nats.JetstreamClient, consumer *JetstreamConsumer) error

Types

type ConsumerConfig

type ConsumerConfig jetstream.ConsumerConfig

type JetstreamConsumer

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

func (*JetstreamConsumer) Consume

func (jc *JetstreamConsumer) Consume(consumeFn func(msg *types.ConsumeMsg) error, opts types.ConsumeOpts) error

Consume implements messaging.Consumer.

func (*JetstreamConsumer) Stop

Stop implements Consumer.

type JetstreamConsumerArgs

type JetstreamConsumerArgs struct {
	Stream         string
	ConsumerConfig ConsumerConfig
}

type JetstreamProducer

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

func NewJetstreamProducer

func NewJetstreamProducer(jc *nats.JetstreamClient) *JetstreamProducer

func (*JetstreamProducer) Produce

func (c *JetstreamProducer) Produce(ctx context.Context, msg types.ProduceMsg) error

Produce implements messaging.Producer.

func (*JetstreamProducer) ProduceAsync

func (c *JetstreamProducer) ProduceAsync(ctx context.Context, msg types.ProduceMsg) error

ProduceAsync implements messaging.Producer.

func (*JetstreamProducer) Stop

func (c *JetstreamProducer) Stop(ctx context.Context) error

Stop implements messaging.Producer.

Jump to

Keyboard shortcuts

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