Skip to main content

Crate lean_rs_worker

Crate lean_rs_worker 

Source
Expand description

Worker-process boundary for lean-rs host workloads.

LeanWorker is the public process-boundary supervisor. It hides child spawning, pipe management, protocol framing, child exit parsing, and cleanup behind a small lifecycle API. The protocol module is private; callers should not learn frame bytes or restart bookkeeping. LeanWorkerRestartPolicy cycles the child process for memory reset; it does not change the in-process lean-rs-host memory contract.

Structs§

LeanWorker
Supervisor for one lean-rs-worker child process.
LeanWorkerBatchFingerprint
Stable cache-key-relevant facts for a planned batch.
LeanWorkerBootstrapCheck
One bounded worker bootstrap finding.
LeanWorkerBootstrapReport
Structured result of worker bootstrap checks for one capability builder.
LeanWorkerCancellationToken
Parent-side cancellation token for worker-session requests.
LeanWorkerCapability
A worker-backed capability with its Lake target built and worker started.
LeanWorkerCapabilityBuilder
Builder for a worker-backed Lean capability session.
LeanWorkerCapabilityFact
One named capability advertised by capability metadata.
LeanWorkerCapabilityMetadata
Generic metadata reported by one downstream capability package.
LeanWorkerChild
Locator for an app-owned worker child executable.
LeanWorkerCommandMetadata
One downstream command advertised by capability metadata.
LeanWorkerConfig
Configuration for starting a lean-rs-worker child process.
LeanWorkerDataRow
One downstream-owned JSON row delivered over a worker request.
LeanWorkerDiagnostic
Serializable diagnostic returned by worker elaboration and kernel checks.
LeanWorkerDiagnosticEvent
One diagnostic message delivered over a worker request.
LeanWorkerDoctorDiagnostic
One structured capability health diagnostic.
LeanWorkerDoctorReport
Capability health report returned by a downstream doctor export.
LeanWorkerElabOptions
Bounded elaboration options for worker-session requests.
LeanWorkerElabResult
Serializable elaboration result returned over the worker boundary.
LeanWorkerExit
Rendered child-process exit information.
LeanWorkerImportPlanConfig
Capability and session requirements used to plan worker batches.
LeanWorkerImportPlanner
Planner for worker-pool import/session batches.
LeanWorkerJsonCommand
A non-streaming downstream JSON command.
LeanWorkerKernelResult
Serializable kernel-check result returned over the worker boundary.
LeanWorkerModuleWork
One module-sized unit of planned worker work.
LeanWorkerPlanMetadataExpectation
Metadata expectation carried into planned session keys.
LeanWorkerPlannedBatch
One stable pool-execution batch.
LeanWorkerPool
Local pool for worker-backed capability sessions.
LeanWorkerPoolConfig
Configuration for a local LeanWorkerPool.
LeanWorkerPoolSnapshot
Summary of public pool state.
LeanWorkerProgressEvent
One progress event observed by the parent from a worker request.
LeanWorkerRestartPolicy
Policy for cycling a worker child before the next request.
LeanWorkerRuntimeMetadata
Protocol/runtime facts reported by the worker child during handshake.
LeanWorkerSession
Narrow host-session adapter over a live LeanWorker.
LeanWorkerSessionConfig
Configuration for opening one host session inside a worker child.
LeanWorkerSessionKey
Worker reuse key for a capability-backed session.
LeanWorkerSessionLease
Borrowed lease for running typed commands on a compatible worker session.
LeanWorkerStats
Snapshot of worker lifecycle counters.
LeanWorkerStreamSummary
Summary returned after a worker data-stream export completes.
LeanWorkerStreamingCommand
A streaming downstream JSON command.
LeanWorkerTypedDataRow
One typed downstream row decoded from a worker data row.
LeanWorkerTypedStreamSummary
Typed summary returned after a streaming command reaches terminal success.

Enums§

LeanWorkerBootstrapDiagnosticCode
Stable worker bootstrap diagnostic codes.
LeanWorkerBootstrapSeverity
Severity of one worker bootstrap finding.
LeanWorkerDoctorSeverity
Severity for a capability doctor diagnostic.
LeanWorkerError
Errors reported by the worker supervisor.
LeanWorkerImportPlanError
Import planning diagnostics.
LeanWorkerKernelStatus
Kernel-check status returned over the worker boundary.
LeanWorkerRestartPolicyClass
Coarse restart-policy class used in pool session keys.
LeanWorkerRestartReason
Reason recorded for the latest worker cycle.
LeanWorkerStatus
Public lifecycle state for a worker child.

Constants§

LEAN_WORKER_REQUEST_TIMEOUT_DEFAULT
Default deadline for one worker request after startup.
LEAN_WORKER_REQUEST_TIMEOUT_LONG_RUNNING
Suggested deadline for long-running worker requests.

Traits§

LeanWorkerDataSink
Parent-side sink for downstream data rows produced by one worker request.
LeanWorkerDiagnosticSink
Parent-side sink for diagnostics produced by one worker request.
LeanWorkerProgressSink
Parent-side sink for worker progress events.
LeanWorkerTypedDataSink
Parent-side sink for typed downstream data rows produced by one command.

Functions§

run_worker_child_stdio
Run the worker child process on stdin/stdout.