Logo ProcessKit API Reference

SupervisorRestartEvent Type

A single restart, reported live from the supervision loop (see `Supervisor.OnRestart`) — not to be confused with the final `SupervisionOutcome.Restarts` count. Sealed with an internal constructor so it can gain fields without breaking the frozen API.

Instance members

Instance member Description

this.Cause

Full Usage: this.Cause

Returns: RestartCause

Why this restart is happening — `RestartCause.Exit` for an ordinary completed-run restart, or `RestartCause.Liveness` when a liveness probe found the live child unresponsive. Lets a handler alert on a hung service distinctly from an ordinary crash restart.

Returns: RestartCause

this.Delay

Full Usage: this.Delay

Returns: TimeSpan

The backoff delay the supervisor is about to sleep out before this restart.

Returns: TimeSpan

this.Program

Full Usage: this.Program

Returns: string

The supervised command's program name.

Returns: string

this.Restart

Full Usage: this.Restart

Returns: int

The 1-based lifetime restart number — matches `SupervisionOutcome.Restarts` once this restart becomes the last one.

Returns: int

Type something to start searching.