Expand description
§faucet-sink-nats
A NATS sink for faucet-stream. Publishes each record as
a JSON message to a subject — fixed, or per-record via a configurable
subject_field. The client is flushed after each batch so nothing is left
buffered when the write returns.
Append-only: it does not override idempotency, upsert, or schema-evolution (the trait defaults hold).
use faucet_sink_nats::{NatsSink, NatsSinkConfig};
let sink = NatsSink::new(NatsSinkConfig::new("events.out")).await?;Re-exports§
pub use config::NatsSinkConfig;pub use sink::NatsSink;
Modules§
- config
- Configuration for the NATS sink.
- sink
NatsSink— the NATS producer implementation (the one module that does I/O).
Structs§
- Nats
Connection Config - Connection settings shared by the NATS source and sink.
- NatsTls
- Server verification and client-certificate settings for a connector that dials a TLS server itself (Redis, NATS, Elasticsearch).
Enums§
- Faucet
Error - All possible errors returned by faucet-stream.
- Nats
Auth - NATS client authentication configuration.
Constants§
- DESCRIPTOR
- The connector’s static descriptor (RFC 0013): its capabilities, answered from config alone.
Traits§
- Sink
- A sink writes records to an external system.