Skip to main content

Crate swf_runtime

Crate swf_runtime 

Source
Expand description

§swf_runtime

Execution engine for Serverless Workflow DSL v1.0.0 — parse, validate, and run workflows.

§Features

  • Task runners — set, wait, raise, emit, switch, for, fork, do, try, listen, call, run, custom
  • Expression engine — JQ-based evaluation (jaq) with runtime variable support ($context, $secret, $workflow, $task, $runtime)
  • HTTP client — GET/POST/PUT/DELETE/PATCH with headers, query, auth (Basic, Bearer, Digest, OAuth2, OIDC)
  • Shell execution — command, args, environment, return formats
  • Sub-workflow — run nested workflow definitions with context propagation
  • JSON Schema — input/output validation
  • Secret manager — pluggable secret resolution ($secret variable)
  • Execution listener — event-driven workflow monitoring
  • Custom tasks — extensible via CustomTaskHandler trait

Re-exports§

pub use context::WorkflowContext;
pub use error::ErrorFields;
pub use error::WorkflowError;
pub use error::WorkflowResult;
pub use events::CloudEvent;
pub use events::EventBus;
pub use events::EventSubscription;
pub use events::InMemoryEventBus;
pub use events::SharedEventBus;
pub use handler::CallHandler;
pub use handler::CustomTaskHandler;
pub use handler::HandlerContext;
pub use handler::HandlerRegistry;
pub use handler::RunHandler;
pub use listener::CollectingListener;
pub use listener::MultiListener;
pub use listener::NoOpListener;
pub use listener::WorkflowEvent;
pub use listener::WorkflowExecutionListener;
pub use runner::ScheduledWorkflow;
pub use runner::WorkflowHandle;
pub use runner::WorkflowRunner;
pub use secret::EnvSecretManager;
pub use secret::MapSecretManager;
pub use secret::SecretManager;
pub use status::StatusPhase;
pub use status::StatusPhaseLog;

Modules§

context
error
events
handler
listener
runner
secret
status

Macros§

default_support
Creates default WorkflowContext and TaskSupport from a workflow reference. Use in tests to avoid repeating the 2-line initialization pattern.

Structs§

ExpressionEngineRegistry
Registry of expression engines, keyed by prefix.

Traits§

ExpressionEngine
Trait for pluggable expression evaluation engines.