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

Method Equal

ring/ring.pb.go:303–333  ·  view source on GitHub ↗
(that interface{})

Source from the content-addressed store, hash-verified

301 return strconv.Itoa(int(x))
302}
303func (this *Desc) Equal(that interface{}) bool {
304 if that == nil {
305 return this == nil
306 }
307
308 that1, ok := that.(*Desc)
309 if !ok {
310 that2, ok := that.(Desc)
311 if ok {
312 that1 = &that2
313 } else {
314 return false
315 }
316 }
317 if that1 == nil {
318 return this == nil
319 } else if this == nil {
320 return false
321 }
322 if len(this.Ingesters) != len(that1.Ingesters) {
323 return false
324 }
325 for i := range this.Ingesters {
326 a := this.Ingesters[i]
327 b := that1.Ingesters[i]
328 if !(&a).Equal(&b) {
329 return false
330 }
331 }
332 return true
333}
334func (this *InstanceDesc) Equal(that interface{}) bool {
335 if that == nil {
336 return this == nil

Calls

no outgoing calls