returnnil,fmt.Errorf("rule evaluation interval must be positive duration that is multiple of the base interval %d seconds",baseIntervalSeconds)
}
ifintervalSeconds%baseIntervalSeconds!=0{
returnnil,fmt.Errorf("rule evaluation interval %d should be multiple of the base interval of %d seconds",int64(interval.Seconds()),baseIntervalSeconds)
return0,fmt.Errorf("rule evaluation interval must be positive duration that is multiple of the base interval %d seconds",baseIntervalSeconds)
}
ifintervalSeconds%baseIntervalSeconds!=0{
return0,fmt.Errorf("rule evaluation interval %d should be multiple of the base interval of %d seconds",int64(interval.Seconds()),baseIntervalSeconds)
}
returnintervalSeconds,nil
}
// validateForInterval validates ApiRuleNode.For and converts it to time.Duration. If the field is not specified returns 0 if GrafanaManagedAlert.UID is empty and -1 if it is not.