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: EventBridgeCapabilities config
Property
config: Complete<EventBridgeConfig<ConfigType>> defaultCommandTimeout
Property
defaultCommandTimeout: number inFlightExecutions
Property
inFlightExecutions: InFlightExecutionTracker instanceId
Property
instanceId: string logger
Property
logger: Logger metricsRecorder
Property
metricsRecorder: PuristaMetricsRecorder name
Property
name: string traceProvider
Property
traceProvider: NodeTracerProvider Methods
14 entries
destroy
Method
destroy(): Promise<void> getInFlightExecutionCount
Method
getInFlightExecutionCount(): number getInFlightExecutionCounts
Method
getInFlightExecutionCounts(): InFlightExecutionCounts getPausedSubscriptionConsumers
Method
getPausedSubscriptionConsumers(): PausedSubscriptionConsumersByRegistrationKey getTracer
Method
getTracer(): Tracer Returns 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!