EventDbx.Client
0.1.1
dotnet add package EventDbx.Client --version 0.1.1
NuGet\Install-Package EventDbx.Client -Version 0.1.1
<PackageReference Include="EventDbx.Client" Version="0.1.1" />
<PackageVersion Include="EventDbx.Client" Version="0.1.1" />
<PackageReference Include="EventDbx.Client" />
paket add EventDbx.Client --version 0.1.1
#r "nuget: EventDbx.Client, 0.1.1"
#:package EventDbx.Client@0.1.1
#addin nuget:?package=EventDbx.Client&version=0.1.1
#tool nuget:?package=EventDbx.Client&version=0.1.1
EventDBX .NET Client
Preview C#/.NET SDK for the EventDBX control plane. The client mirrors the Rust/Python implementations: it speaks the Cap'n Proto TCP protocol, performs the Noise NNpsk0 handshake by default, and exposes helpers for aggregates, events, snapshots, schemas, and tenant admin.
Building
A local SDK is already bootstrapped under .dotnet/ in this repo. Use it directly or rely on a system dotnet install:
# using the bundled SDK
DOTNET_ROOT=$(pwd)/.dotnet PATH="$DOTNET_ROOT:$PATH" dotnet build
Cap'n Proto types are generated into src/EventDbx.Client/Generated/proto/ via capnpc-csharp. Regenerate after schema changes with:
DOTNET_ROOT=$(pwd)/.dotnet PATH="$DOTNET_ROOT:$PATH" \
PATH="$(pwd)/.dotnet-tools:$PATH" \
capnp compile -ocsharp:src/EventDbx.Client/Generated -Iproto proto/control.capnp proto/schema.capnp
Packaging (NuGet)
Pack the client from the repo root (adjust PackageVersion as needed):
DOTNET_ROOT=$(pwd)/.dotnet PATH="$DOTNET_ROOT:$PATH" \
dotnet pack src/EventDbx.Client/EventDbx.Client.csproj \
-c Release /p:PackageVersion=0.1.0-preview1
Packages land in artifacts/nuget/ alongside symbols and include this README as the NuGet readme.
CI/CD
- Single workflow (
.github/workflows/pipeline.yml) handles CI and releases. - Triggers: PRs to
main, pushes tomain, and manual dispatch. - CI job: restore, build, test (
Release). - Release job (runs on
mainpushes or manual dispatch): auto bumps the patch version from the latestv*tag, builds/tests, packs with/p:PackageVersion=<next>, pushes a new tag, publishes to NuGet.org, and creates a GitHub release attaching the packages. - Secrets: add
NUGET_API_KEY(Publish API key from nuget.org) in repo settings. The workflow skips publish if it is absent.
Usage
using EventDbx;
var client = await EventDbxClient.ConnectAsync(new EventDbxClientOptions
{
Host = "127.0.0.1",
Port = 6363,
Token = "control-token",
TenantId = "tenant-123",
});
// append an event
await client.AppendEventAsync(new AppendEventParams
{
AggregateType = "orders",
AggregateId = "ord_1",
EventType = "created",
Payload = new { total = 42.15 },
});
// list aggregates
var aggregates = await client.ListAggregatesAsync(new ListAggregatesOptions
{
Take = 50,
SortText = "created_at:desc",
});
// fetch events
var eventsPage = await client.ListEventsAsync("orders", "ord_1");
await client.DisposeAsync();
The client can disable Noise by setting UseNoise = false in EventDbxClientOptions (useful only for plaintext test sockets).
Notes
- Generated code currently emits nullable warnings; they are cosmetic and stem from the Cap'n Proto generator.
- Frames are limited to 16 MiB to align with the other SDKs.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Capnp.Net.Runtime (>= 1.3.118)
- Noise.NET (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.