Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// business
model.Supervisor
// health.go: Alive fails only when in-process recovery is spent (a
// service dead with restarts exhausted) - the signal to let the platform
// replace the process. Ready is the roll-up: nil iff every registered
// service is ready. Both judge from cached stats; probing stays the
// monitor's job.
common.Liveness
common.Readiness
// lifecycle
common.Initializable
common.Daemon
common.Debuggable
}
type Option ¶
type Option func(*manager)
func WithInitPolicy ¶ added in v0.6.9
WithInitPolicy sets how a service's init turn retries - waiting on dependencies to become ready, or re-running its own failed Init. maxRetries bounds the attempts: 0 disables retries (a single pass, the default), n > 0 allows n retries after the first attempt, -1 retries until the Init context is canceled. The wait between attempts starts at delay (1s when unset), doubles per attempt, and caps at maxDelay; when maxDelay <= delay the wait stays fixed.
func WithLogger ¶
func WithMonitorPolicy ¶ added in v0.6.9
WithMonitorPolicy sets the health monitor's shape: interval is the sweep cadence (0, the default, disables monitoring), maxRetries bounds in-process restarts per service (0 none - a liveness failure escalates immediately, n up to n, -1 unlimited), and restartDelay pauses before each restart attempt.
func WithStopPolicy ¶ added in v0.6.9
WithStopPolicy sets how Stop ends: timeout bounds the whole shutdown, 0 (the default) waits indefinitely.