nats

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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