nats

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"nats",
	fx.Provide(sprout.Logger("nats"), fx.Private),
	fx.Provide(sprout.Config("NATS", &Config{}), fx.Private),
	fx.Provide(newNats),
	fx.Provide(newJetStream),
	fx.Provide(newLegacyJetStream),
)

Module that provides a connection to a NATS server.

Functions

This section is empty.

Types

type Config

type Config struct {
	// URL is the URL of the NATS server to connect to.
	URL string `env:"URL,required"`

	// PublishAsyncMaxPending is the maximum number of messages that can be
	// published asynchronously before blocking new publishes.
	PublishAsyncMaxPending int `env:"PUBLISH_ASYNC_MAX_PENDING" envDefault:"256"`
}

Jump to

Keyboard shortcuts

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