UNPKG

vulcain-corejs

Version:
28 lines (27 loc) 1.22 kB
import { ICommand } from './abstractCommand'; import { RequestContext } from '../../servers/requestContext'; export interface CommandConfiguration { circuitEnabled?: boolean; circuitBreakerSleepWindowInMilliseconds?: number; circuitBreakerRequestVolumeThreshold?: number; executionIsolationSemaphoreMaxConcurrentRequests?: number; fallbackIsolationSemaphoreMaxConcurrentRequests?: number; circuitBreakerForceOpened?: boolean; circuitBreakerForceClosed?: boolean; statisticalWindowNumberOfBuckets?: number; statisticalWindowLength?: number; percentileWindowNumberOfBuckets?: number; percentileWindowLength?: number; circuitBreakerErrorThresholdPercentage?: number; executionTimeoutInMilliseconds?: number; metricsRollingStatisticalWindowInMilliseconds?: number; metricsRollingPercentileWindowInMilliseconds?: number; } /** * Command attribute */ export declare function Command(config?: CommandConfiguration, commandKey?: string, commandGroup?: string): (command: Function) => void; export declare class CommandFactory { static getAsync(commandKey: string, context: RequestContext, schema?: string): Promise<ICommand>; static resetCache(): void; }