Expand description
NATS client
NatsClient
provided here is a wrapper around [Client
] that provides convenient methods
using domain-specific traits.
Before reading code, make sure to familiarize yourself with NATS documentation, especially with subjects and Core NATS features.
Abstractions provided here cover a few use cases:
- request/response (for example piece request)
- request/stream of responses (for example a stream of plotted sectors of the farmer)
- notifications (typically targeting a particular instance of an app) and corresponding subscriptions (for example solution notification)
- broadcasts and corresponding subscriptions (for example slot info broadcast)
Structs§
- NATS client wrapper that can be used to interact with other Subspace-specific clients
- Wrapper around subscription that transforms stream of wrapped response messages into a normal
Response
stream. - Subscriber wrapper that decodes messages automatically and skips messages that can’t be decoded
Enums§
- Stream request error
Traits§
- Generic broadcast message.
- Generic one-off notification
- Generic request with associated response.
- Generic stream request where response is streamed using
NatsClient::stream_request_responder
.