import * as amqp from 'amqplib'; import { CalculatedData } from 'island-status-exporter'; export declare const STATUS_EXPORT: boolean; export declare const STATUS_EXPORT_TIME_MS: number; export interface Message { content: Buffer; properties: amqp.Options.Publish; } export interface CollectOptions { requestId?: string; msg?: Message; shard?: number; err?: any; ignoreTimestamp?: boolean; } export declare type CollectedStatusExporter = (collected: CalculatedData) => Promise; export declare class StatusCollector { private collectedData; private onGoingMap; private startedAt; private exporters; saveStatus(): Promise; registerExporter(type: string, exporter: CollectedStatusExporter): Promise; collectRequestAndReceivedTime(type: string, name: string, options?: CollectOptions): string; /** * Note: * 1. Error 처리된 Request는 측정 데이터에서 배제 된다 * 2. ErrorCount === RequestCount - ExecutedCount */ collectExecutedCountAndExecutedTime(type: string, name: string, options: CollectOptions): void; calculateMeasurementsByType(): CalculatedData; sigInfo(type: string): Promise; getOnGoingRequestCount(type?: string): number; hasOngoingRequests(type?: string): boolean; needCircuitBreak(type: string, name: string): boolean; private getStat; private clearAndShiftData; } export declare const collector: StatusCollector;