Crate tower_worker

Crate tower_worker 

Source
Expand description

Provides Tower layers focues on wrapping services with asynchronous worker tasks that may also make requests to the wrapped service.

Structsยง

PeriodicLayerperiodic
Layer that spawns a worker task that periodically sends a request to the service at a given interval and then passes through the wrapped service.. Spawns a worker task with a clone of the inner service that periodically makes a request to the inner service.
WorkerLayer
Layer that spawns a provided worker task using a closure that accepts a clone of the service and then passes through the wrapped service. Spawns a worker task with a clone of the inner service.