runifold-workflow 0.2.0

Durable workflow and Agent orchestration runtime for Runifold
Documentation
use std::{
    collections::BTreeMap,
    future::Future,
    pin::Pin,
    sync::{
        Arc,
        atomic::{AtomicU64, AtomicUsize, Ordering},
    },
    time::Duration,
};

use futures_timer::Delay;
use futures_util::{
    StreamExt,
    future::{Either, select},
    stream::FuturesUnordered,
};
use runifold_core::{
    Budget, BudgetExceeded, BudgetTracker, CancellationToken, CapabilitySet, CheckpointError,
    CheckpointErrorKind, CheckpointId, Journal, RunContext, Usage,
};
use thiserror::Error;

use crate::WorkflowWake;
use crate::execution::WorkflowExecution;
use crate::{
    LeaseDuration, WorkerId, Workflow, WorkflowCheckpoint, WorkflowDisposition, WorkflowError,
    WorkflowLease, WorkflowOutcome, WorkflowResumePolicy, WorkflowStore, WorkflowStoreError,
    WorkflowStoreErrorKind, WorkflowTask,
};

mod execution;
mod supervisor;
mod types;

pub use types::{
    SystemWorkflowWorkerSleeper, WorkflowDefinition, WorkflowFailurePolicy, WorkflowRegistry,
    WorkflowSupervisor, WorkflowSupervisorConfig, WorkflowSupervisorMetricSnapshot,
    WorkflowSupervisorMetrics, WorkflowSupervisorReport, WorkflowWorker, WorkflowWorkerError,
    WorkflowWorkerOutcome, WorkflowWorkerSleepFuture, WorkflowWorkerSleeper,
};

#[cfg(test)]
mod tests;