MCPcopy Create free account
hub / github.com/astercloud/aster / AllForOneStrategy

Struct AllForOneStrategy

pkg/actor/supervisor.go:120–127  ·  view source on GitHub ↗

AllForOneStrategy 全部重启策略 当一个子 Actor 失败时,重启所有子 Actor

Source from the content-addressed store, hash-verified

118// AllForOneStrategy 全部重启策略
119// 当一个子 Actor 失败时,重启所有子 Actor
120type AllForOneStrategy struct {
121 MaxRestarts int
122 WithinDuration time.Duration
123 Decider Decider
124
125 mu sync.Mutex
126 restartWindow []time.Time
127}
128
129// NewAllForOneStrategy 创建全部重启策略
130func NewAllForOneStrategy(maxRestarts int, within time.Duration, decider Decider) *AllForOneStrategy {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected