Classes · @purista/core

EventBridgeBaseClass

The base class to be extended by event bridge implementations

Signature

EventBridgeBaseClass.tstypescript
class EventBridgeBaseClass<ConfigType>

Constructors

1 entry

constructor

Constructor

Source
constructor.tstypescript
new constructor<ConfigType>(name: string, config: mapped)

Properties

9 entries

capabilities

Property

Source
capabilities.tstypescript
capabilities: EventBridgeCapabilities

config

Property

Source
config.tstypescript
config: Complete<EventBridgeConfig<ConfigType>>

defaultCommandTimeout

Property

Source
defaultCommandTimeout.tstypescript
defaultCommandTimeout: number

inFlightExecutions

Property

Source
inFlightExecutions.tstypescript
inFlightExecutions: InFlightExecutionTracker

instanceId

Property

Source
instanceId.tstypescript
instanceId: string

logger

Property

Source
logger.tstypescript
logger: Logger

metricsRecorder

Property

Source
metricsRecorder.tstypescript
metricsRecorder: PuristaMetricsRecorder

name

Property

Source
name.tstypescript
name: string

traceProvider

Property

Source
traceProvider.tstypescript
traceProvider: NodeTracerProvider

Methods

14 entries

destroy

Method

Source
destroy.tstypescript
destroy(): Promise<void>

getInFlightExecutionCount

Method

Source
getInFlightExecutionCount.tstypescript
getInFlightExecutionCount(): number

getInFlightExecutionCounts

Method

Source
getInFlightExecutionCounts.tstypescript
getInFlightExecutionCounts(): InFlightExecutionCounts

getPausedSubscriptionConsumers

Method

Source
getPausedSubscriptionConsumers.tstypescript
getPausedSubscriptionConsumers(): PausedSubscriptionConsumersByRegistrationKey

getTracer

Method

Source
getTracer.tstypescript
getTracer(): Tracer

Returns open telemetry tracer of this service

openStream

Method

Source
openStream.tstypescript
openStream<Chunk, Final>(_input: Omit<StreamOpenRequest, "id" | "messageType" | "timestamp" | "correlationId">, _ttl?: number): Promise<StreamHandle<Chunk, Final>>

registerStream

Method

Source
registerStream.tstypescript
registerStream(_address: EBMessageAddress, _cb: (message: StreamMessage) => Promise<void>, _metadata: StreamDefinitionMetadataBase, _eventBridgeConfig: DefinitionEventBridgeConfig): Promise<string>

resumeSubscriptionConsumer

Method

Source
resumeSubscriptionConsumer.tstypescript
resumeSubscriptionConsumer(_registrationKey: string): Promise<void>

runInFlight

Method

Source
runInFlight.tstypescript
runInFlight<T>(fn: () => Promise<T>, kind: "stream" | "command" | "subscription" | "generic"): Promise<T>

start

Method

Source
start.tstypescript
start(): Promise<void>

startActiveSpan

Method

Source
startActiveSpan.tstypescript
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

Source
unregisterStream.tstypescript
unregisterStream(_address: EBMessageAddress): Promise<void>

waitForInFlightDrain

Method

Source
waitForInFlightDrain.tstypescript
waitForInFlightDrain(timeoutMs: number): Promise<boolean>

wrapInSpan

Method

Source
wrapInSpan.tstypescript
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!