Commit 77a2733
committed
feat: add Supervisor and DynamicSupervisor
Implements Erlang/OTP-style supervision for fault-tolerant systems:
Supervisor:
- Manages a static set of child processes defined at start
- Monitors children and restarts them according to restart strategy
- Supports restart strategies: OneForOne, OneForAll, RestForOne
- Child specs with: restart type, shutdown behavior, child type
DynamicSupervisor:
- Manages dynamically spawned children
- Supports start_child/terminate_child for runtime management
- Configurable max_children limit
Features:
- Automatic restart on child crash (permanent, temporary, transient)
- Max restart intensity to prevent restart loops
- Graceful shutdown with configurable timeout
- Type-safe child handle abstraction
- Full integration with GenServer Backend system
- Comprehensive test suite (unit + integration tests)1 parent 09d054a commit 77a2733
2 files changed
+2126
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
0 commit comments