Skip to main content

Crate aion_server

Crate aion_server 

Source
Expand description

Deployable HTTP, gRPC, WebSocket, and worker endpoint for Aion workflows.

This crate wraps the transport-agnostic engine with API handlers, namespace isolation, observability, shutdown handling, dashboard assets, and remote-worker task dispatch.

§Example

use aion_server::ServerConfig;

let config = ServerConfig::default();
println!("serving gRPC on {}", config.server.grpc_address);

Re-exports§

pub use config::ServerConfig;
pub use deploy::DeployGuard;
pub use dev_ui::ActivityMockRegistry;
pub use dev_ui::DevMockingDispatcher;
pub use dev_ui::MockedActivity;
pub use error::ServerError;
pub use error::StreamFailure;
pub use namespace::CallerIdentity;
pub use namespace::NAMESPACE_ATTRIBUTE;
pub use namespace::NamespaceGuard;
pub use namespace::NamespaceOperation;
pub use namespace::NamespaceResolver;
pub use namespace::ScheduleNamespaceSource;
pub use namespace::ScheduleTarget;
pub use namespace::ScopedEngine;
pub use namespace::StaticScheduleNamespaces;
pub use namespace::StaticWorkflowNamespaces;
pub use namespace::SubscriptionScope;
pub use namespace::WorkflowAttribution;
pub use namespace::WorkflowNamespaceSource;
pub use namespace::WorkflowTarget;
pub use run::run;
pub use state::ServerState;
pub use worker::HeartbeatTracker;
pub use worker::HeartbeatUpdate;
pub use worker::InFlightActivity;
pub use worker::LostWorkerReport;
pub use worker::TaskLiveness;

Modules§

api
HTTP, gRPC, and worker API handlers. Module declarations.
authoring
Server-side Gleam authoring surface (compile, type-check, package, hot-load). Server-side Gleam authoring surface: compile, type-check, package, and hot-load submitted workflow source.
config
Runtime configuration loading and validation. Runtime configuration loading and validation for aion-server.
dashboard
Dashboard asset serving helpers. Embedded dashboard asset serving support.
deploy
Operator deploy surface authorization. Operator deploy surface: authorization guard for the deploy API.
dev_ui
Local dev-server surface: trigger a run, stream it over the existing firehose, mock a named activity per-run, and replay a failed run — all over the real engine, store, and event stream. Local dev-server surface with production parity.
error
Server error and stream-failure types. ServerError taxonomy for server library modules.
namespace
Namespace resolution and authorization guard types. Namespace authorization and routing support.
observability
Health, metrics, and tracing support. Server-level observability surfaces.
routing
Distributed request routing: the gRPC-edge availability layer over the fence. Distributed request routing — the gRPC-edge availability layer over the epoch fence (DISTRIBUTED-ROUTING-DESIGN §2).
run
Server run loop: configuration load, transports, and graceful shutdown. Run loop for the Aion workflow server: tracing initialization, configuration load, transport startup, and signal-driven graceful shutdown.
shutdown
Cooperative shutdown and drain handling. Graceful shutdown and single-node activity drain coordination.
state
Shared server state construction and access. Shared server state constructed once at startup.
stream
WebSocket event-streaming support. Event subscription streaming surfaces.
worker
Remote-worker registry, heartbeat, and dispatch support. Module declarations.