()
| 593 | } |
| 594 | |
| 595 | func (d *Desc) writableInstancesWithTokensCountPerZone() map[string]int { |
| 596 | instancesCountPerZone := map[string]int{} |
| 597 | if d != nil { |
| 598 | for _, ingester := range d.Ingesters { |
| 599 | if len(ingester.Tokens) > 0 && !ingester.ReadOnly { |
| 600 | instancesCountPerZone[ingester.Zone]++ |
| 601 | } |
| 602 | } |
| 603 | } |
| 604 | return instancesCountPerZone |
| 605 | } |
| 606 | |
| 607 | func (d *Desc) readOnlyInstancesAndOldestReadOnlyUpdatedTimestamp() (int, int64) { |
| 608 | readOnlyInstances := 0 |
no outgoing calls
no test coverage detected