docs.rs failed to build tephra-client-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
tephra-client
A synchronous, blocking TCP client for a tephra event store, speaking the length-prefixed protobuf protocol.
The client speaks clean Rust types: the shared vocabulary from
tephra-types (Query, QueryItem,
AppendCondition, Position, EventType, Tag, Tags) plus a friendly owned Event and
SequencedEvent. The wire protobuf types are an implementation detail hidden behind these.
It exposes append, one-shot reads, and live subscriptions (catch-up followed by a live tail, with no gap or duplicate at the boundary).
Example
use ;
let mut client = connect?;
// Append an event: type, tags, and an opaque payload. `None` means no append condition.
let event = new?;
let result = client.append?;
println!;
// Read every event matching a query, from the beginning.
let query = item;
let = client.read_all?;
for seq in &events
Subscriptions follow the same query model; see the crate documentation
for the subscribe API.
Related crates
tephra-server: the server this client connects to.tephra-types: the shared vocabulary.tephra: the embedded engine, if you do not need the network.
License
Licensed under the Apache License, Version 2.0.