Crate smelter_worker

Crate smelter_worker 

Source
Expand description

Common code used for communicating between the job manager and worker tasks.

Modules§

stats
Worker statistics collection

Structs§

SubtaskId
The ID for a subtask, which uniquely identifies it within a [Job].
WorkerError
A serializable error returned from a worker
WorkerInput
The input payload that a worker will read when starting
WorkerInputPayload
The input payload that a worker will read when starting
WorkerOutput
The output payload that the worker writes when a task finishes.

Enums§

WorkerResult
The result of a worker task
WrapperError
An error that the worker wrapper framework may encounter

Functions§

get_trace_context
Encode the current trace context so that it can be passed across process lines.
propagate_tracing_context
If tracing is enabled, propagate the trace context from the spawner into the current span.
run_worker
Run the worker and return its output, ready for writing back to the output payload location. Usually you will want to call the equivalent run_worker function in the platform-specific module instead.
trace_result
Trace the result of an operation.