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::ListPage;
pub use ops::StartOptions;
pub use ops::WorkflowDescription;
pub use payload::from_payload;
pub use payload::to_payload;
pub use stream::EventStream;
pub use stream::ResumingEventStream;
pub use stream::SubscribeTarget;

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.
stream
Event stream and subscription helpers. Event subscription Stream and resumption.
transport
Transport adapters (gRPC, WebSocket event streaming, embedded engine). Transport adapters used by the client.