Skip to main content

Module server

Module server 

Source
Expand description

Async IPC server — accepts connections and drives the per-connection loop.

The entry point is run_worker, which product binaries call from main:

forge_worker_sdk::server::run_worker(
    &args.socket,
    ArchivistHandler::new(&args.source_id),
    forge_worker_sdk::framing::Encoding::from_str(&args.encoding).unwrap(),
).await?;

§Connection model

One connection = one Go supervisor client. Multiple concurrent connections are supported (each gets its own event channel), though in practice only one supervisor connects at a time. Jobs outlive the connection that started them: if the client disconnects mid-scan the runner task continues and the job stays in the registry until GC.

Functions§

run_worker
Start the IPC server. Blocks until the process exits (or an unrecoverable listener error occurs).