()
| 114 | } |
| 115 | |
| 116 | func (cfg *RingConfig) ToRingConfig() ring.Config { |
| 117 | rc := ring.Config{} |
| 118 | flagext.DefaultValues(&rc) |
| 119 | |
| 120 | rc.KVStore = cfg.KVStore |
| 121 | rc.HeartbeatTimeout = cfg.HeartbeatTimeout |
| 122 | rc.SubringCacheDisabled = true |
| 123 | rc.ZoneAwarenessEnabled = cfg.ZoneAwarenessEnabled |
| 124 | rc.DetailedMetricsEnabled = cfg.DetailedMetricsEnabled |
| 125 | |
| 126 | // Each rule group is evaluated by *exactly* one ruler, but it can be loaded by multiple rulers for API HA |
| 127 | rc.ReplicationFactor = cfg.ReplicationFactor |
| 128 | |
| 129 | return rc |
| 130 | } |
| 131 | |
| 132 | // GetReplicationSetForListRule is similar to ring.GetReplicationSetForOperation but does NOT require quorum. Because |
| 133 | // it does not require quorum it returns healthy instance in the AZ with failed instances unlike |
no test coverage detected