Skip to main content

aion_client/
lib.rs

1//! Rust caller SDK for the `aion-server` workflow-management API.
2//!
3//! The SDK connects to an Aion server over gRPC and exposes typed helpers for
4//! starting, signaling, querying, canceling, listing, describing, and subscribing
5//! to workflows.
6//!
7//! # Example
8//!
9//! ```no_run
10//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
11//! use aion_client::{ClientAuth, ClientBuilder};
12//!
13//! let mut builder = ClientBuilder::new("http://127.0.0.1:50051")
14//!     .with_namespace("default");
15//! if let Ok(token) = std::env::var("AION_AUTH_TOKEN") {
16//!     builder = builder.with_auth(ClientAuth::bearer(token));
17//! }
18//! let client = builder.build().await?;
19//! let _shared = client.clone();
20//! # Ok(())
21//! # }
22//! ```
23
24/// Client builder, authentication, TLS options, and workflow operations.
25pub mod client;
26/// Client-side error taxonomy.
27pub mod error;
28/// Workflow-scoped operation handle.
29pub mod handle;
30/// Operation option and response models.
31pub mod ops;
32/// Typed conversion helpers between serde values and Aion payloads.
33pub mod payload;
34/// Event stream and subscription helpers.
35pub mod stream;
36/// Transport adapters (gRPC, WebSocket event streaming, embedded engine).
37pub mod transport;
38
39pub use client::{Client, ClientAuth, ClientBuilder, TlsOptions};
40pub use error::{ClientError, ErrorDetail};
41pub use handle::WorkflowHandle;
42pub use ops::{ListPage, StartOptions, WorkflowDescription};
43pub use payload::{from_payload, to_payload};
44pub use stream::{EventStream, ResumingEventStream, SubscribeTarget};