PartitionDesc holds the state of a single partition.
| 150 | |
| 151 | // PartitionDesc holds the state of a single partition. |
| 152 | type PartitionDesc struct { |
| 153 | // The partition ID. This value is the same as the key in the partitions map in PartitionRingDesc. |
| 154 | Id int32 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"` |
| 155 | // Unique tokens, generated with deterministic token generator. Tokens MUST be immutable: |
| 156 | // if tokens get changed, the change will not be propagated via memberlist. |
| 157 | Tokens []uint32 `protobuf:"varint,1,rep,packed,name=tokens,proto3" json:"tokens,omitempty"` |
| 158 | // The state of the partition. |
| 159 | State PartitionState `protobuf:"varint,2,opt,name=state,proto3,enum=ring.PartitionState" json:"state,omitempty"` |
| 160 | // Unix timestamp (with seconds precision) of when has the state changed last time for this partition. |
| 161 | StateTimestamp int64 `protobuf:"varint,3,opt,name=stateTimestamp,proto3" json:"stateTimestamp,omitempty"` |
| 162 | // Whether the state can be changed. Set this to true to prevent any change to the state, |
| 163 | // unless this field gets changed back to false first. |
| 164 | StateChangeLocked bool `protobuf:"varint,5,opt,name=stateChangeLocked,proto3" json:"stateChangeLocked,omitempty"` |
| 165 | // Unix timestamp (with seconds precision) of when has the state change lock been mutated last time for this partition. |
| 166 | StateChangeLockedTimestamp int64 `protobuf:"varint,6,opt,name=stateChangeLockedTimestamp,proto3" json:"stateChangeLockedTimestamp,omitempty"` |
| 167 | } |
| 168 | |
| 169 | func (m *PartitionDesc) Reset() { *m = PartitionDesc{} } |
| 170 | func (*PartitionDesc) ProtoMessage() {} |
nothing calls this directly
no outgoing calls
no test coverage detected