public override void check(ApiStatInfo apiStatInfo) { if (apiStatInfo.getErrorCount() > rule.getMatchedRule(apiStatInfo.getApi()).getMaxErrorCount()) { notification.notify(NotificationEmergencyLevel.SEVERE, "..."); } }
public void check(ApiStatInfo apiStatInfo) { foreach (AlertHandler handler in alertHandlers) { //执行检查逻辑 handler.check(apiStatInfo); } }
public override void check(ApiStatInfo apiStatInfo) { long tps = apiStatInfo.getRequestCount() / apiStatInfo.getDurationOfSeconds(); if (tps > rule.getMatchedRule(apiStatInfo.getApi()).getMaxTps()) { notification.notify(NotificationEmergencyLevel.URGENCY, "..."); } }
public abstract void check(ApiStatInfo apiStatInfo);
public override void check(ApiStatInfo apiStatInfo) { //新增逻辑 }