@iota-big3/sdk-gateway
Version:
Universal API Gateway with protocol translation, intelligent routing, rate limiting, health checking, and caching
38 lines • 1.25 kB
TypeScript
import { EventEmitter } from 'events';
import { GatewayRequest, GatewayResponse, SLAConfig, SLAViolation } from '../types/gateway-types';
export declare class SLAMonitor extends EventEmitter {
private slaConfigs;
private violations;
private metrics;
private isEnabled;
constructor();
addSLA(routePath: string, slaConfig: SLAConfig): void;
removeSLA(routePath: string): void;
recordRequest(routePath: string, request: GatewayRequest, response: GatewayResponse): void;
private checkViolations;
private executeAction;
getViolations(routePath?: string): SLAViolation[];
getSLAStatus(routePath: string): {
isCompliant: boolean;
responseTime: {
average: number;
p95: number;
threshold: number;
};
errorRate: {
current: number;
threshold: number;
};
availability: {
current: number;
threshold: number;
};
} | null;
resetMetrics(routePath?: string): void;
clearViolations(routePath?: string): void;
getAllSLAs(): Map<string, SLAConfig>;
enable(): void;
disable(): void;
isSLAEnabled(): boolean;
}
//# sourceMappingURL=sla-monitor.d.ts.map