Skip to main content

Install a client

Pick the client for your runtime. They expose the same operations; see Clients overview for the comparison.

ClientPackageStatus
.NETCeleriant.Client on NuGetpublished, 0.8.0
Rustceleriant_client_tokio on crates.iopublished, 0.2.0
CLI / TUIceleriant_cli in the server repobuild from source

.NET​

Targets net8.0, net9.0 and net10.0.

dotnet add package Celeriant.Client
using Celeriant.Client;

await using var pool = new CeleriantPool(new CeleriantPoolOptions { Address = "localhost:10000" });

Request and response types live in Celeriant.Client.Requests and Celeriant.Client.Responses, exceptions in Celeriant.Client.Errors. See the .NET client.

Rust​

Tokio only. The glommio client in the server repo is not published.

cargo add celeriant_client_tokio celeriant_wal celeriant_msg

celeriant_wal has AggregateKey; celeriant_msg has the request types (ReadRequest, WriteRequest, ReadFilters).

use celeriant_client_tokio::{CeleriantPool, PoolOptions};

let pool = CeleriantPool::new(PoolOptions::new("localhost:10000"));

CeleriantPool::new does not connect; the first request does. Defaults are a 5 s connection timeout and a 30 s request timeout. See the Rust client.

CLI​

The CLI and interactive TUI are a separate binary, celeriant_cli. It is not in the container image and not published, so build it from the server repo:

cargo build --release -p celeriant_cli

./target/release/celeriant_cli write --org 1 --type 1 --id 1 \
--client-id 1 --event-type 1 --data '{"hello":"world"}' --allow-create
./target/release/celeriant_cli read --org 1 --type 1 --id 1 --from 1

--allow-create is off by default in the CLI, unlike the libraries. The server address defaults to 127.0.0.1:10000; change it with --server. Run the binary with no command for the TUI. See the CLI and TUI.

Next: your first aggregate.