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"`
}
Click to show internal directories.
Click to hide internal directories.