Skip to main content

Crate boardwalk

Crate boardwalk 

Source
Expand description

Boardwalk — resource / actor runtime with hypermedia federation.

Boardwalk models addressable state as Resource values, drives executable state machines as Actor values inside a NodeBuilder / Node runtime, and renders queryable ResourceSnapshot values through resource routes such as /resources, /resources/{id}, and /resources/{id}/transitions/{transition}. Boardwalk::new().use_actor(...).listen(...) assembles that Node with the reusable HTTP, WebSocket, and peer route stack. Use NodeBuilder directly when an application wants the in-process Resource/Actor runtime without starting Boardwalk’s HTTP server.

Common imports for the Resource/Actor surface:

use boardwalk::{
    Actor, NodeBuilder, Resource, ResourceSnapshot, SlowConsumerPolicy,
    TransitionInput, TransitionOutcome,
};

The examples/job-runner package shows async transition acceptance with job resources, explicit actor event publishing, and stream-specific slow-consumer policy choices. See the README for an introduction.

Re-exports§

pub use crate::events::SlowConsumerPolicy;
pub use crate::runtime::Actor;
pub use crate::runtime::ActorSpec;
pub use crate::runtime::Effect;
pub use crate::runtime::FieldSpec;
pub use crate::runtime::Idempotency;
pub use crate::runtime::JobHandle;
pub use crate::runtime::Node;
pub use crate::runtime::NodeBuilder;
pub use crate::runtime::NodeHandle;
pub use crate::runtime::Resource;
pub use crate::runtime::ResourceKind;
pub use crate::runtime::ResourceSnapshot;
pub use crate::runtime::ResourceSpec;
pub use crate::runtime::SnapshotStreamSpec;
pub use crate::runtime::StateName;
pub use crate::runtime::StreamKind;
pub use crate::runtime::StreamSpec;
pub use crate::runtime::TransitionAffordance;
pub use crate::runtime::TransitionInput;
pub use crate::runtime::TransitionName;
pub use crate::runtime::TransitionOutcome;
pub use crate::runtime::TransitionResultKind;
pub use crate::runtime::TransitionSpec;

Modules§

caql
CaQL — Calypso Query Language.
events
Event bus + multiplex WebSocket sub-protocol types.
query
Runtime-owned query model. CaQL is one syntax adapter; this module holds the canonical AST and evaluator.
runtime
Runtime model: the Resource / Actor split, contexts, the Node unit, the resource directory, the bounded-execution ActorHandle, and the app-facing NodeHandle/ResourceProxy surface.

Structs§

Boardwalk

Attribute Macros§

actor
Generate an Actor trait impl for an inherent impl block.
transition
Marker attribute. Recognized by #[actor] on methods. On its own, it’s a no-op.