MCPcopy Create free account
hub / github.com/cortexproject/cortex / DisabledRuleGroups

Method DisabledRuleGroups

pkg/util/validation/limits.go:1123–1141  ·  view source on GitHub ↗
(userID string)

Source from the content-addressed store, hash-verified

1121}
1122
1123func (o *Overrides) DisabledRuleGroups(userID string) DisabledRuleGroups {
1124 if o.tenantLimits != nil {
1125 l := o.tenantLimits.ByUserID(userID)
1126 if l != nil {
1127 disabledRuleGroupsForUser := make(DisabledRuleGroups, len(l.DisabledRuleGroups))
1128
1129 for i, disabledRuleGroup := range l.DisabledRuleGroups {
1130 disabledRuleGroupForUser := DisabledRuleGroup{
1131 Namespace: disabledRuleGroup.Namespace,
1132 Name: disabledRuleGroup.Name,
1133 User: userID,
1134 }
1135 disabledRuleGroupsForUser[i] = disabledRuleGroupForUser
1136 }
1137 return disabledRuleGroupsForUser
1138 }
1139 }
1140 return DisabledRuleGroups{}
1141}
1142
1143func (o *Overrides) RulerExternalLabels(userID string) labels.Labels {
1144 return o.GetOverridesForUser(userID).RulerExternalLabels

Callers

nothing calls this directly

Calls 1

ByUserIDMethod · 0.65

Tested by

no test coverage detected