Expand description
NATS-related stuff and utilities
Re-exportsยง
pub use config::NatsConfiguration;pub use config::NatsConfigurationError;
Modulesยง
- auth_
management - Utilities for creating NATS Accounts, Users and JWTs
- client ๐
- The NATS connection handle (
NatsClient) and its shared alias (SharedNatsClient). - config
- Configuration for connecting to NATS.
- consumergroup
- Consumer groups for NATS
- credentials ๐
- NATS credentials, that can be turned into async_nats::ConnectOptions
- headers
- Custom NATS message headers used by the request-reply transport.
- mock
- Mock implementation that combines both publish/subscribe and request/response patterns for unit testing without a NATS server.
- opentelemetry
- Utilities for tracing over NATS
- publisher ๐
Publisherimplementation forNatsClient.- requester ๐
- Request-reply over NATS: typed command dispatch for the server side, and fire-and-wait request for the client side.
- responder ๐
NatsClientimplementation ofResponder- typed command stream for request-reply dispatch.- resubscribe ๐
- Functionality to detect NATS disconnects and seamless reconnects
- subscriber ๐
Subscriberimplementation forNatsClientand theNatsReceivedEventwrapper type.- test_
utils - Utilities for running tests against a NATS instance.
Structsยง
- Nats
Client - Live handle to a NATS client including a JetStream connection.
- Nats
JwtCredentials - Credentials to authenticate to a NATS server via JWT and Private key.
- Nats
Received Command - Server-side wrapper around a received command, implementing
ReceivedCommand<C>. - Nats
Received Event - A JetStream message that has been deserialized into
E. - Nats
Request Body - The body of a request to be sent over NATS.
- Signing
Key - ed25519 signing key which can be used to produce signatures.
- Subscriber
- This is exported so that the NatsClient APIs can access it.
Retrieves messages from given
subscriptioncreated by [Client::subscribe].
Enumsยง
- Command
Error - Re-exported so services only need to depend on
arminius-lib-nats. - Message
BusError - Re-exported so services only need to depend on
arminius-lib-nats. - Nats
Credentials - Information required to authenticate against NATS server
- Nats
Error - Errors that can occur while interacting with NATS, its JetStream context, or the key-value store.
Traitsยง
- Command
- Re-exported so services only need to depend on
arminius-lib-nats. - Event
- Re-exported so services only need to depend on
arminius-lib-nats. - Publisher
- Re-exported so services only need to depend on
arminius-lib-nats. - Received
Command - Re-exported so services only need to depend on
arminius-lib-nats. - Received
Event - Re-exported so services only need to depend on
arminius-lib-nats. - Requester
- Re-exported so services only need to depend on
arminius-lib-nats. - Responder
- Re-exported so services only need to depend on
arminius-lib-nats.
Functionsยง
- encode_
subject_ segment - Re-exported so services only need to depend on
arminius-lib-nats.
Type Aliasesยง
- Shared
Nats Client - A connection to NATS and JetStream.