Skip to main content

Module background

Module background 

Source
Expand description

Bounded process-local tasks authorized by successful endpoint responses.

Tasks run sequentially within a request batch after the endpoint produces a 2xx response. Failed extraction, errors, cancellation and panic discard queued work. This boundary does not guarantee streaming-body delivery or client receipt; middleware may subsequently replace the response. Accepted work is tracked by the application’s lifespan and drained before resource teardown within its shutdown deadline. Task panic is logged and later tasks in the batch continue. A crash still loses process-local work.

§Durable queues

TaskQueue is the interface for a durable backend. Redis / RabbitMQ adapters are not provided in this phase.

Structs§

BackgroundTaskLimits
Limits for each app’s process-local background queue.
BackgroundTasks
Collect bounded process-local work for a successful endpoint response.
TaskId
Identifier of an enqueued durable task.

Enums§

BackgroundTaskError
Rejection while queuing process-local work.
TaskQueueError
Failure to enqueue a durable task.

Traits§

Task
A serializable unit of work for a TaskQueue.
TaskQueue
Durable task queue. Implementations (Redis, RabbitMQ, …) ship later.