Every default value in controls, what changes it, and what a zero value does.
Two of them are exported constants you can reference in your own code; the rest
are internal values applied when you leave a field at zero.
Each field's default applies when you leave it at zero, so
RestartPolicy{MaxRestarts: 5} gets the 1s/30s/30s timings below.
Field
Default when zero
Notes
MaxRestarts
unlimited
N allows N restarts, i.e. N + 1 runs.
InitialBackoff
1s
First wait before a restart.
MaxBackoff
30s
Ceiling for the doubling wait.
Backoff multiplier
2.0
Fixed; not a field, and there is no jitter.
HealthCheckInterval
10s
Poll interval for WithStatus while health monitoring is on.
HealthFailureThreshold
0 — health monitoring off
Also stays off with no WithStatus probe, whatever the value.
RestartResetInterval
DefaultRestartResetInterval = 30s
A run lasting at least this long resets both the consecutive-failure counter and the backoff.
Backoff sequence with the defaults, for a service that fails immediately every
time: 1s, 2s, 4s, 8s, 16s, 30s, 30s, … Because each run is far shorter than the
30s reset window, none of those failures ages out, so MaxRestarts is reached.
The 1s initial backoff, 30s max backoff, 10s health interval, 5s check timeout,
2.0 multiplier and 3× staleness multiple are internal. You cannot reference them
by name, and they are not covered by the module's compatibility promise the way
an exported constant is — set the corresponding field explicitly if your process
depends on a particular value.