eventstore-rs

Crates.io Crates.io Github action CI workflow Discord Crates.io

Rust [EventStore] TCP Client.

[Talk and exchange ideas in our dedicated Discord Server]

State of implemented features

Example

```rust

[macro_use]

extern crate serde_json;

use eventstore::{ Connection, EventData }; use futures::Future;

[tokio::main]

async fn main() -> Result<(), Box> { let addr = "127.0.0.1:1113".parse()?; let connection = Connection::builder() .singlenodeconnection(addr) .await;

// It is not mandatory to use JSON as a data format however GetEventStore
// provides great additional value if you do so.
let payload = json!({
    "is_rust_a_nice_language": true,
});

let event = EventData::json("language-poll", payload)?;

let result = connection
    .write_events("language-stream")
    .push_event(event)
    .execute()
    .await?;

// Do something productive with the result.
println!("{:?}", result);

Ok(())

} ```

Notes

That library was tested on Linux and OSX.

Contributions and bug reports are welcome!

MIT License