changes_stream2
Fork of https://github.com/ashleygwilliams/changes-stream-rust / https://crates.io/crates/changes-stream.
An implementation of changes-stream
in Rust.
This code reads in a readable stream from an endpoint, parses each line and returns CouchDB changes events as defined in src/event.rs.
usage
in your Cargo.toml
:
[]
= "0.2"
from examples/follower.rs:
use ;
use StreamExt;
async
features
metrics
Enables metrics collection of the changes stream as counter values. The name is generated from the host and path of the url(database name). The metrics are:
couchdb_changes_{name}_bytes
: Total bytes read from the changes streamcouchdb_changes_{name}_entries
: Total parsed change entries
raw_value_doc
Changes the type of ChangeEvent::Doc from serde_json::Map<String, serde_json::Value>
to serde_json::value::RawValue
.
native-tls
Use the native-tls crate for TLS connections. This is the default.
rustls-tls
Use the rustls crate for TLS connections.