Skip to main content

Crate arminius_lib_nats

Crate arminius_lib_nats 

Source
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 ๐Ÿ”’
Publisher implementation for NatsClient.
requester ๐Ÿ”’
Request-reply over NATS: typed command dispatch for the server side, and fire-and-wait request for the client side.
responder ๐Ÿ”’
NatsClient implementation of Responder - typed command stream for request-reply dispatch.
resubscribe ๐Ÿ”’
Functionality to detect NATS disconnects and seamless reconnects
subscriber ๐Ÿ”’
Subscriber implementation for NatsClient and the NatsReceivedEvent wrapper type.
test_utils
Utilities for running tests against a NATS instance.

Structsยง

NatsClient
Live handle to a NATS client including a JetStream connection.
NatsJwtCredentials
Credentials to authenticate to a NATS server via JWT and Private key.
NatsReceivedCommand
Server-side wrapper around a received command, implementing ReceivedCommand<C>.
NatsReceivedEvent
A JetStream message that has been deserialized into E.
NatsRequestBody
The body of a request to be sent over NATS.
SigningKey
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 subscription created by [Client::subscribe].

Enumsยง

CommandError
Re-exported so services only need to depend on arminius-lib-nats.
MessageBusError
Re-exported so services only need to depend on arminius-lib-nats.
NatsCredentials
Information required to authenticate against NATS server
NatsError
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.
ReceivedCommand
Re-exported so services only need to depend on arminius-lib-nats.
ReceivedEvent
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ยง

SharedNatsClient
A connection to NATS and JetStream.

Derive Macrosยง

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.