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

Function GetOrCreatePartitionRingDesc

ring/partition_ring_model.go:51–62  ·  view source on GitHub ↗
(in any)

Source from the content-addressed store, hash-verified

49}
50
51func GetOrCreatePartitionRingDesc(in any) *PartitionRingDesc {
52 if in == nil {
53 return NewPartitionRingDesc()
54 }
55
56 desc := in.(*PartitionRingDesc)
57 if desc == nil {
58 return NewPartitionRingDesc()
59 }
60
61 return desc
62}
63
64func NewPartitionRingDesc() *PartitionRingDesc {
65 return &PartitionRingDesc{

Calls 1

NewPartitionRingDescFunction · 0.85