jetstream

package
v4.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

func NewNatsQueue

func NewNatsQueue(ctx context.Context, u *url.URL, streamName string) (*Queue, error)

func (*Queue) Consume

func (q *Queue) Consume(process func(...broker.Message)) error

Consume creates a jetstream Consumer with the current streamName

func (*Queue) Push

func (q *Queue) Push(ctx context.Context, event proto.Message) error

Push serializes json-encoded context metadata and proto-encoded event together

func (*Queue) PushRaw added in v4.2.6

func (q *Queue) PushRaw(ctx context.Context, message broker.Message) error

PushRaw forwards a broker.Message to the queue

Jump to

Keyboard shortcuts

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