Skip to main content

Crate aion_client

Crate aion_client 

Source
Expand description

Rust caller SDK for the aion-server workflow-management API.

The SDK connects to an Aion server over gRPC and exposes typed helpers for starting, signaling, querying, canceling, listing, describing, and subscribing to workflows.

§Example

use aion_client::{ClientAuth, ClientBuilder};

let mut builder = ClientBuilder::new("http://127.0.0.1:50051")
    .with_namespace("default");
if let Ok(token) = std::env::var("AION_AUTH_TOKEN") {
    builder = builder.with_auth(ClientAuth::bearer(token));
}
let client = builder.build().await?;
let _shared = client.clone();

Re-exports§

pub use client::Client;
pub use client::ClientAuth;
pub use client::ClientBuilder;
pub use client::TlsOptions;
pub use error::ClientError;
pub use error::ErrorDetail;
pub use handle::WorkflowHandle;
pub use ops::HistoryPage;
pub use ops::ListPage;
pub use ops::PauseOutcome;
pub use ops::ReopenOutcome;
pub use ops::ResumeOutcome;
pub use ops::WorkflowDescription;
pub use payload::from_payload;
pub use payload::to_payload;
pub use start::DisplayNameNotApplied;
pub use start::StartOptions;
pub use start::StartOutcome;
pub use stream::EventStream;
pub use stream::ResumingEventStream;
pub use stream::SubscribeTarget;
pub use transcript::TranscriptStream;
pub use transcript::TranscriptStreamItem;
pub use transcript::TranscriptTarget;

Modules§

client
Client builder, authentication, TLS options, and workflow operations. Client and ClientBuilder connection, auth, and TLS support.
error
Client-side error taxonomy. ClientError taxonomy and transport/proto error mapping.
handle
Workflow-scoped operation handle. WorkflowHandle signal, query, cancel, describe, and subscribe support.
ops
Operation option and response models. start/signal/query/cancel/list/describe over the transport.
payload
Typed conversion helpers between serde values and Aion payloads. Typed conversion helpers for Payload values.
start
The start surface: options, outcome, and the SDK-boundary idempotency key. The start surface of the caller SDK: options, outcome, the SDK-boundary idempotency fingerprint, and Client::start itself.
stream
Event stream and subscription helpers. Event subscription Stream and resumption.
transcript
Typed activity-attempt transcript subscriptions. Typed client subscription for one activity-attempt transcript stream.
transport
Transport adapters (gRPC, WebSocket event streaming, embedded engine). Transport adapters used by the client.