Classes · @purista/core

EventBridgeBaseClass

The base class to be extended by event bridge implementations

Signature

EventBridgeBaseClass.ts typescript
class EventBridgeBaseClass<ConfigType>

Constructors

1 entry

constructor

Constructor

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

Properties

9 entries

capabilities

Property

Source
capabilities.ts typescript
capabilities: EventBridgeCapabilities

config

Property

Source
config.ts typescript
config: Complete<EventBridgeConfig<ConfigType>>

defaultCommandTimeout

Property

Source
defaultCommandTimeout.ts typescript
defaultCommandTimeout: number

inFlightExecutions

Property

Source
inFlightExecutions.ts typescript
inFlightExecutions: InFlightExecutionTracker

instanceId

Property

Source
instanceId.ts typescript
instanceId: string

logger

Property

Source
logger.ts typescript
logger: Logger

metricsRecorder

Property

Source
metricsRecorder.ts typescript
metricsRecorder: PuristaMetricsRecorder

name

Property

Source
name.ts typescript
name: string

traceProvider

Property

Source
traceProvider.ts typescript
traceProvider: NodeTracerProvider

Methods

14 entries

destroy

Method

Source
destroy.ts typescript
destroy(): Promise<void>

getInFlightExecutionCount

Method

Source
getInFlightExecutionCount.ts typescript
getInFlightExecutionCount(): number

getInFlightExecutionCounts

Method

Source
getInFlightExecutionCounts.ts typescript
getInFlightExecutionCounts(): InFlightExecutionCounts

getPausedSubscriptionConsumers

Method

Source
getPausedSubscriptionConsumers.ts typescript
getPausedSubscriptionConsumers(): PausedSubscriptionConsumersByRegistrationKey

getTracer

Method

Source
getTracer.ts typescript
getTracer(): Tracer

Returns open telemetry tracer of this service

openStream

Method

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

registerStream

Method

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

resumeSubscriptionConsumer

Method

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

runInFlight

Method

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

start

Method

Source
start.ts typescript
start(): Promise<void>

startActiveSpan

Method

Source
startActiveSpan.ts typescript
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.ts typescript
unregisterStream(_address: EBMessageAddress): Promise<void>

waitForInFlightDrain

Method

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

wrapInSpan

Method

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