File
Blob: spec/chord/state.go
| 1 | //go:generate stringer -type=State |
| 2 | package chord |
| 3 | |
| 4 | type State uint64 |
| 5 | |
| 6 | const ( |
| 7 | // Node not running, default state |
| 8 | Inactive State = iota |
| 9 | // In the progress of joining the network |
| 10 | Joining |
| 11 | // Ready to handle lookup and KV requests |
| 12 | Active |
| 13 | // Handling join request from another node |
| 14 | Transferring |
| 15 | // Leaving and transferring keys to successor |
| 16 | Leaving |
| 17 | // No longer an active node |
| 18 | Left |
| 19 | ) |