MCPcopy
hub / github.com/grafana/dskit / PartitionDesc

Struct PartitionDesc

ring/partition_ring_desc.pb.go:152–167  ·  view source on GitHub ↗

PartitionDesc holds the state of a single partition.

Source from the content-addressed store, hash-verified

150
151// PartitionDesc holds the state of a single partition.
152type 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
169func (m *PartitionDesc) Reset() { *m = PartitionDesc{} }
170func (*PartitionDesc) ProtoMessage() {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected