aion_server/lib.rs
1//! Deployable HTTP, gRPC, WebSocket, and worker endpoint for Aion workflows.
2//!
3//! This crate wraps the transport-agnostic engine with API handlers, namespace
4//! isolation, observability, shutdown handling, dashboard assets, and
5//! remote-worker task dispatch.
6//!
7//! # Example
8//!
9//! ```
10//! use aion_server::ServerConfig;
11//!
12//! let config = ServerConfig::default();
13//! println!("serving gRPC on {}", config.server.grpc_address);
14//! ```
15
16/// HTTP, gRPC, and worker API handlers.
17pub mod api;
18#[cfg(feature = "auth")]
19/// Authentication middleware and token validation.
20pub mod auth;
21/// Runtime configuration loading and validation.
22pub mod config;
23/// Dashboard asset serving helpers.
24pub mod dashboard;
25/// Operator deploy surface authorization.
26pub mod deploy;
27/// Server error and stream-failure types.
28pub mod error;
29/// Engine-internal workflow filtering for enumeration surfaces.
30mod internal_workflow;
31/// Namespace resolution and authorization guard types.
32pub mod namespace;
33/// Health, metrics, and tracing support.
34pub mod observability;
35/// Server run loop: configuration load, transports, and graceful shutdown.
36pub mod run;
37/// Cooperative shutdown and drain handling.
38pub mod shutdown;
39/// Shared server state construction and access.
40pub mod state;
41/// WebSocket event-streaming support.
42pub mod stream;
43/// Remote-worker registry, heartbeat, and dispatch support.
44pub mod worker;
45
46pub use config::ServerConfig;
47pub use deploy::DeployGuard;
48pub use error::{ServerError, StreamFailure};
49pub use namespace::{
50 CallerIdentity, NAMESPACE_ATTRIBUTE, NamespaceGuard, NamespaceOperation, NamespaceResolver,
51 ScheduleNamespaceSource, ScheduleTarget, ScopedEngine, StaticScheduleNamespaces,
52 StaticWorkflowNamespaces, SubscriptionScope, WorkflowAttribution, WorkflowNamespaceSource,
53 WorkflowTarget,
54};
55pub use run::run;
56pub use state::ServerState;
57pub use worker::{
58 HeartbeatTracker, HeartbeatUpdate, InFlightActivity, LostWorkerReport, TaskLiveness,
59};