/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { IContext } from "@fluidframework/server-services-core"; export interface circuitBreakerOptions { errorThresholdPercentage: number; resetTimeout: number; timeout: boolean; rollingCountTimeout: number; rollingCountBuckets: number; errorFilter?: (error: any) => boolean; fallbackToRestartTimeoutMs?: number; } export declare class LambdaCircuitBreaker { private readonly circuitBreaker; private readonly context; private readonly dependencyName; private readonly executeFunction; private readonly healthCheckFunction; private readonly healthCheckParams; private readonly fallbackToRestartTimeoutMs; private circuitBreakerMetric; private circuitBreakerOpenCount; private error; private fallbackToRestartTimeout; constructor(circuitBreakerOptions: circuitBreakerOptions, context: IContext, dependencyName: string, executeFunction: (...args: any[]) => Promise, healthCheckFunction: (...args: any[]) => Promise, healthCheckParams?: any[]); execute(params: any[], doHealthCheck?: boolean): Promise; getCurrentState(): string; shutdown(): void; private openCallback; private closeCallback; private halfOpenCallback; private failureCallback; private rejectCallback; private setupRestartFallback; private resetTelemetryAndFallback; } //# sourceMappingURL=circuitBreaker.d.ts.map