Classes · @purista/core
EventBridgeBaseClass
The base class to be extended by event bridge implementations
Signature
class EventBridgeBaseClass<ConfigType>Constructors
1 entry
constructor
Constructor
new constructor<ConfigType>(name: string, config: mapped)Properties
9 entries
capabilities
Property
capabilities: EventBridgeCapabilitiesconfig
Property
config: Complete<EventBridgeConfig<ConfigType>>defaultCommandTimeout
Property
defaultCommandTimeout: numberinFlightExecutions
Property
inFlightExecutions: InFlightExecutionTrackerinstanceId
Property
instanceId: stringlogger
Property
logger: LoggermetricsRecorder
Property
metricsRecorder: PuristaMetricsRecordername
Property
name: stringtraceProvider
Property
traceProvider: NodeTracerProviderMethods
14 entries
destroy
Method
destroy(): Promise<void>getInFlightExecutionCount
Method
getInFlightExecutionCount(): numbergetInFlightExecutionCounts
Method
getInFlightExecutionCounts(): InFlightExecutionCountsgetPausedSubscriptionConsumers
Method
getPausedSubscriptionConsumers(): PausedSubscriptionConsumersByRegistrationKeygetTracer
Method
getTracer(): TracerReturns open telemetry tracer of this service
openStream
Method
openStream<Chunk, Final>(_input: Omit<StreamOpenRequest, "id" | "messageType" | "timestamp" | "correlationId">, _ttl?: number): Promise<StreamHandle<Chunk, Final>>registerStream
Method
registerStream(_address: EBMessageAddress, _cb: (message: StreamMessage) => Promise<void>, _metadata: StreamDefinitionMetadataBase, _eventBridgeConfig: DefinitionEventBridgeConfig): Promise<string>resumeSubscriptionConsumer
Method
resumeSubscriptionConsumer(_registrationKey: string): Promise<void>runInFlight
Method
runInFlight<T>(fn: () => Promise<T>, kind: "stream" | "command" | "subscription" | "generic"): Promise<T>start
Method
start(): Promise<void>startActiveSpan
Method
startActiveSpan<F>(name: string, opts: SpanOptions, context: Context | undefined, fn: (span: Span) => Promise<F>): Promise<F>Start a child span for opentelemetry tracking
unregisterStream
Method
unregisterStream(_address: EBMessageAddress): Promise<void>waitForInFlightDrain
Method
waitForInFlightDrain(timeoutMs: number): Promise<boolean>wrapInSpan
Method
wrapInSpan<F>(name: string, opts: SpanOptions, fn: (span: Span) => Promise<F>, context?: Context): Promise<F>Start span for opentelemetry tracking on same level. The created span will not become the "active" span within opentelemetry!