Skip to main content

Crate orleans_rust_client

Crate orleans_rust_client 

Source
Expand description

Rust client bindings for Microsoft Orleans services via an official .NET gRPC bridge.

This crate provides an ergonomic, async Rust API for calling Orleans grains without reimplementing Orleans’ internal gateway protocol or serialization runtime. A small .NET bridge (see the dotnet/ directory in the repository) hosts the official Orleans IClusterClient and exposes a generic gRPC surface that this crate talks to.

use orleans_rust_client::{GrainKey, OrleansClient};

let client = OrleansClient::connect("http://127.0.0.1:50051").await?;

let counter = client.grain(
    "Counter.Abstractions.ICounterGrain",
    "counter",
    GrainKey::String("demo".into()),
);

let value: i64 = counter.invoke_json("Get", &()).await?;
println!("value = {value}");

Modules§

codes
Stable, machine-readable error codes returned by the bridge.
pb
Generated protobuf message types for the bridge protocol (orleans.bridge.v1).

Structs§

ClientConfig
Connection and per-call defaults for an crate::OrleansClient.
GrainRef
A handle to a specific grain (interface + grain type + key) on which methods can be invoked.
OrleansClient
A cheaply-cloneable handle to an Orleans bridge.
OrleansClientBuilder
Builder for OrleansClient with non-default connection settings.
RawResponse
The raw result of an OrleansClient invocation: opaque payload bytes plus any response-context entries the grain produced.
RequestContext
An ordered set of string key/value pairs propagated with a grain call.
RetryPolicy
Exponential-backoff retry configuration.
TlsConfig
Transport security configuration for the gRPC channel.

Enums§

GrainKey
The primary key used to address an Orleans grain activation.
OrleansError
Errors returned by crate::OrleansClient and grain calls.

Constants§

DEFAULT_TIMEOUT
Default per-call deadline applied when neither the call nor the client overrides it.