nats

package
v0.0.0-...-0ca2cd7 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInconsistentConsumerConfig = errors.New(
		"consumer configuration is inconsistent: requires migration",
	)
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Close()
	IsConnected() bool
	JetStreamSubscribe(ctx context.Context, sub, dur string, q chan model.Job) error
	JetStreamPublish(string, []byte) error
	Migrate(ctx context.Context, sub, dur string, recreate bool) error
}

Client is the nats client

func NewClient

func NewClient(url string) (Client, error)

NewClient returns a new nats client with default options

type UnsubscribeFunc

type UnsubscribeFunc func() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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