UnstableActor 不稳定的 Actor - 模拟故障
| 148 | |
| 149 | // UnstableActor 不稳定的 Actor - 模拟故障 |
| 150 | type UnstableActor struct { |
| 151 | name string |
| 152 | failCount int |
| 153 | maxFails int |
| 154 | recovered bool |
| 155 | } |
| 156 | |
| 157 | func (a *UnstableActor) Receive(ctx *actor.Context, msg actor.Message) { |
| 158 | switch m := msg.(type) { |
nothing calls this directly
no outgoing calls
no test coverage detected