Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

KurrentDB Rust Client

License

NotificationsYou must be signed in to change notification settings

kurrent-io/KurrentDB-Client-Rust

 
 

Repository files navigation

Crates.ioCrates.ioBuild StatusDiscordCrates.io

Documentation

Official RustKurrentDB rust gRPC gRPC Client.

KurrentDB is the event-native database, where business events are immutably stored and streamed. Designed for event-sourced, event-driven, and microservices architectures.

KurrentDB Server Compatibility

This client is compatible with version20.6.1 upwards and works on Linux, MacOS and Windows.

Server setup instructions can be found hereKurrentDB Docs, follow the docker setup for the simplest configuration.

Example

use kurrentdb::{Client,EventData};use serde::{Serialize,Deserialize};#[derive(Serialize,Deserialize,Debug)]structFoo{is_rust_a_nice_language:bool,}#[tokio::main]asyncfnmain() ->Result<(),Box<dyn std::error::Error>>{// Creates a client settings for a single node configuration.let settings ="kurrentdb://admin:changeit@localhost:2113".parse()?;let client =Client::new(settings)?;let payload =Foo{is_rust_a_nice_language:true,};// It is not mandatory to use JSON as a data format however KurrentDB// provides great additional value if you do so.let evt =EventData::json("language-poll",&payload)?;    client.append_to_stream("language-stream",&Default::default(), evt).await?;letmut stream = client.read_stream("language-stream",&Default::default()).await?;whileletSome(event) = stream.next().await?{let event = event.get_original_event().as_json::<Foo>()?;// Do something productive with the result.println!("{:?}", event);}Ok(())}

Support

Information on support can be found here:KurrentDB Support

Documentation

Documentation for KurrentDB can be found here:KurrentDB Docs

Bear in mind that this client is not yet properly documented. We are working hard on a new version of the documentation.

Communities

Packages

No packages published

Languages

  • Rust100.0%

[8]ページ先頭

©2009-2025 Movatter.jp