import type { Context, Span, SpanOptions } from '@opentelemetry/api'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import type { PuristaMetricsRecorder } from '../metrics/types.js'; import type { Complete } from '../types/Complete.js'; import type { DefinitionEventBridgeConfig } from '../types/DefinitionEventBridgeConfig.js'; import type { EBMessageAddress } from '../types/EBMessageAddress.js'; import type { InstanceId } from '../types/InstanceId.js'; import type { Logger } from '../types/Logger.js'; import type { InFlightExecutionCounts, PausedSubscriptionConsumersByRegistrationKey } from '../types/ServiceOperatorState.js'; import type { StreamDefinitionMetadataBase } from '../types/stream/StreamDefinitionMetadataBase.js'; import type { StreamHandle } from '../types/stream/StreamHandle.js'; import type { StreamMessage } from '../types/stream/StreamMessage.js'; import type { StreamOpenRequest } from '../types/stream/StreamOpenRequest.js'; import { InFlightExecutionTracker } from './InFlightExecutionTracker.impl.js'; import type { EventBridgeCapabilities } from './types/EventBridgeCapabilities.js'; import type { EventBridgeConfig } from './types/EventBridgeConfig.js'; /** * The base class to be extended by event bridge implementations * * @group Event bridge */ export declare class EventBridgeBaseClass { logger: Logger; traceProvider: NodeTracerProvider; protected metricsRecorder: PuristaMetricsRecorder; config: Complete>; name: string; capabilities: EventBridgeCapabilities; instanceId: Readonly; defaultCommandTimeout: Readonly; protected readonly inFlightExecutions: InFlightExecutionTracker; constructor(name: string, config: EventBridgeConfig); /** * Returns open telemetry tracer of this service * * @returns Tracer */ getTracer(): import("@opentelemetry/api").Tracer; /** * Start a child span for opentelemetry tracking * @param name name of span * @param opts span options * @param context optional context * @param fn function to be executed within the span * @returns return value of fn */ startActiveSpan(name: string, opts: SpanOptions, context: Context | undefined, fn: (span: Span) => Promise): Promise; private recordBridgeOperation; /** * Start span for opentelemetry tracking on same level. * The created span will not become the "active" span within opentelemetry! * * This means during logging and similar the spanId of parent span is logged. * * Use wrapInSpan for marking points in flow of one bigger function, * but not to trace the program flow itself * * @param name name of span * @param opts span options * @param fn function te be executed in the span * @param context span context * @returns return value of fn */ wrapInSpan(name: string, opts: SpanOptions, fn: (span: Span) => Promise, context?: Context): Promise; destroy(): Promise; start(): Promise; runInFlight(fn: () => Promise, kind?: 'command' | 'subscription' | 'stream' | 'generic'): Promise; waitForInFlightDrain(timeoutMs?: number): Promise; getInFlightExecutionCount(): number; getInFlightExecutionCounts(): InFlightExecutionCounts; getPausedSubscriptionConsumers(): PausedSubscriptionConsumersByRegistrationKey; resumeSubscriptionConsumer(_registrationKey: string): Promise; openStream(_input: Omit, _ttl?: number): Promise>; registerStream(_address: EBMessageAddress, _cb: (message: StreamMessage) => Promise, _metadata: StreamDefinitionMetadataBase, _eventBridgeConfig: DefinitionEventBridgeConfig): Promise; unregisterStream(_address: EBMessageAddress): Promise; } //# sourceMappingURL=EventBridgeBaseClass.impl.d.ts.map