Module std.restart

Restart delay policies for supervisor declarations.

Contents

Functions

Function exponential

pub fn exponential(initial: duration, maximum: duration) -> Backoff

Construct a bounded exponential restart delay.

Types

Struct Backoff

Per-role exponential delay, evaluated once when its supervisor is spawned. The first crash waits initial; subsequent crashes double the delay up to maximum. After a replacement runs for a healthy supervisor restart window, the next crash starts at initial again. Waiting for a replacement does not count as healthy execution. Each stable role keeps its own delay.

Fields

initial: duration
maximum: duration