Skip to main content

Crate journio_core

Crate journio_core 

Source
Expand description

§journio-core

Pure-Rust port of the core engine of journio-transact-golang.

This crate defines the erased, object-safe traits that the runtime, the Postgres/SQLite backends, and the Python/Node bindings all build on. There is intentionally no I/O here beyond trait definitions — concrete backends live in journio-postgres / journio-sqlite.

Porting source: journio/journio.go, journio/workflow.go, journio/dialect.go, journio/errors.go, journio/serialization.go, journio/system_database.go, journio/client.go.

Status: the core runtime path and workflow primitives (durable Sleep, Send/Recv, SetEvent/GetEvent, RunWorkflow/RunAsStep, recovery/ replay) are implemented, alongside queues, scheduler, streams, debouncer, patching, and the standalone Client. The SQLite and Postgres backends (journio-sqlite, journio-postgres), the CLI (journio-cli), the admin HTTP server (journio-admin), and the Node.js bindings are provided as sibling crates. Remaining: the conductor and further language bindings.

Re-exports§

pub use client::Client;
pub use client::ClientScheduleInput;
pub use config::Config;
pub use context::DebounceOptions;
pub use context::EnqueueOptions;
pub use context::ForkWorkflowOptions;
pub use context::JournioContext;
pub use context::QueueOptions;
pub use context::ReadStreamOptions;
pub use context::ScheduleOptions;
pub use context::WorkflowContext;
pub use context::WorkflowHandle;
pub use dialect::Dialect;
pub use dialect::DialectName;
pub use error::JournioError;
pub use error::JournioErrorCode;
pub use system_db::ForkWorkflow;
pub use system_db::InitWorkflow;
pub use system_db::InitWorkflowResult;
pub use system_db::Notification;
pub use system_db::SystemDatabase;
pub use types::ListWorkflowsFilter;
pub use types::QueueConfig;
pub use types::ScheduleStatus;
pub use types::ScheduledWorkflowInput;
pub use types::StepRecord;
pub use types::StreamEntry;
pub use types::VersionInfo;
pub use types::WorkflowSchedule;
pub use types::WorkflowStatus;
pub use types::WorkflowStatusType;
pub use value::Interchange;
pub use value::JsonSerializer;
pub use value::Serializer;
pub use workflow::Registry;
pub use workflow::Step;
pub use workflow::StepFunc;
pub use workflow::Workflow;
pub use workflow::WorkflowFn;

Modules§

client
Programmatic client — ported from journio/client.go (879 LOC).
config
Configuration — ported from Config in journio/journio.go and ClientConfig in journio/client.go.
context
Runtime contexts & handles — ported from journio/journio.go (JOURNIOContext, journioContext) and journio/workflow.go (workflowState, WorkflowHandle).
dialect
Backend dialect abstraction — ported from journio/dialect.go.
error
Error model — ported from journio/errors.go.
system_db
System database abstraction — ported from journio/system_database.go (5,916 LOC).
types
Shared record types — ported from journio/workflow.go (status, steps) and journio/system_database.go row mappings.
value
Serialization interchange — ported from journio/serialization.go.
workflow
Workflow & step execution model — ported from journio/workflow.go.