Skip to main content

Crate ironflow_worker

Crate ironflow_worker 

Source
Expand description

§ironflow-worker

HTTP-based background worker for ironflow. Polls the API server for pending workflow runs, executes them locally, and reports results back.

The worker communicates with the API via /api/v1/internal/* routes, authenticated with a static WORKER_TOKEN.

§Quick start

use std::sync::Arc;
use std::time::Duration;
use ironflow_worker::WorkerBuilder;
use ironflow_core::providers::claude::ClaudeCodeProvider;

let worker = WorkerBuilder::new("http://localhost:3000", "my-worker-token")
    .provider(Arc::new(ClaudeCodeProvider::new()))
    .concurrency(4)
    .poll_interval(Duration::from_secs(2))
    .build()?;

worker.run().await?;

Re-exports§

pub use error::WorkerError;
pub use worker::Worker;
pub use worker::WorkerBuilder;

Modules§

error
Error types for the background worker.
worker
Worker – polls the API for pending runs and executes them.