-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathremote_state.go
30 lines (23 loc) · 952 Bytes
/
remote_state.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package api
type RemoteState uint8
const (
// Should never be in this state. Indicates a bug.
NsUnknown RemoteState = iota
// Stable states
NsInactive
NsActive
// During transitions
NsPreparing // Pending -> Inactive
NsActivating // Inactive -> Active
NsDeactivating // Active -> Inactive
NsDropping // Inactive -> NotFound
// Special case: This is never returned by probes, since those only include
// the state of ranges which the node has. This is returned by redundant
// Drop RPCs which instruct nodes to drop a range that they don't have.
// (Maybe it was already dropped, or maybe the node never had it. Can't
// know.) This is a success, not an error, because those RPCs may be
// received multiple times during a normal drop, and should be treated
// idempotently. But we don't want to return NsUnknown, because we do know.
NsNotFound
)
//go:generate stringer -type=RemoteState -output=zzz_remote_state.go