MaxDurationPerTenant is returning the maximum duration per tenant. Without tenants given it will return a time.Duration(0).
(tenantIDs []string, f func(string) time.Duration)
| 1228 | // MaxDurationPerTenant is returning the maximum duration per tenant. Without |
| 1229 | // tenants given it will return a time.Duration(0). |
| 1230 | func MaxDurationPerTenant(tenantIDs []string, f func(string) time.Duration) time.Duration { |
| 1231 | result := time.Duration(0) |
| 1232 | for _, tenantID := range tenantIDs { |
| 1233 | v := f(tenantID) |
| 1234 | if v > result { |
| 1235 | result = v |
| 1236 | } |
| 1237 | } |
| 1238 | return result |
| 1239 | } |
| 1240 | |
| 1241 | // LimitsPerLabelSetsForSeries checks matching labelset limits for the given series. |
| 1242 | func LimitsPerLabelSetsForSeries(limitsPerLabelSets []LimitsPerLabelSet, metric labels.Labels) []LimitsPerLabelSet { |