Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestartStrategy ¶
type RestartStrategy int
const ( // PermanentRestartStrategy the child process is always restarted. PermanentRestartStrategy RestartStrategy = iota // TemporaryRestartStrategy the child process is never restarted, regardless of the supervision strategy. // Any termination (even abnormal) is considered successful. TemporaryRestartStrategy // TransientRestartStrategy child process is restarted only if it terminates abnormally TransientRestartStrategy )
type ShutdownStrategy ¶
type ShutdownStrategy int
const ( ImmediateShutdownStrategy ShutdownStrategy = iota TimeoutShutdownStrategy )
type Strategy ¶
type Strategy struct { Restart RestartStrategy Shutdown ShutdownStrategy Supervision SupervisionStrategy }
func NewStrategy ¶
func NewStrategy() Strategy
type StrategyOption ¶
type StrategyOption func(strategy *Strategy)
func WithRestartStrategy ¶
func WithRestartStrategy(restart RestartStrategy) StrategyOption
func WithShutdownStrategy ¶
func WithShutdownStrategy(shutdown ShutdownStrategy) StrategyOption
func WithSupervisionStrategy ¶
func WithSupervisionStrategy(supervision SupervisionStrategy) StrategyOption
type SupervisionStrategy ¶
type SupervisionStrategy int
const ( // OneForOneSupervisionStrategy if a child process terminates, only that process is restarted. OneForOneSupervisionStrategy SupervisionStrategy = iota // OneForAllSupervisionStrategy if a child process terminates, all other child processes are terminated and then // all child processes (including the terminated one) are restarted. OneForAllSupervisionStrategy )
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func New ¶
func New(name string, children ...Spec) *Supervisor
func (*Supervisor) Manifest ¶
func (s *Supervisor) Manifest() async.Manifest
Click to show internal directories.
Click to hide internal directories.