Interfaces · @purista/core
ServiceClass
The ServiceClass interface
Signature
interface ServiceClass<S>Properties
3 entries
Methods
13 entries
destroy
Method
destroy(): Promise<void>Stop and destroy the current service
getContextFunctions
Method
getContextFunctions(logger: Logger): ContextBase<S["Metrics"]>getInFlightDiagnostics
Method
getInFlightDiagnostics(): InFlightDiagnosticsgetPausedSubscriptionConsumerState
Method
getPausedSubscriptionConsumerState(): PausedSubscriptionConsumersByRegistrationKeygetQueueWorkerPauseState
Method
getQueueWorkerPauseState(): QueueWorkerPauseStateByQueuegetServiceHealth
Method
getServiceHealth(): Promise<ServiceHealthState>getTracer
Method
getTracer(): Tracerget the opentelemetry tracer of the service
pauseQueueWorkers
Method
pauseQueueWorkers(queueName: string, reason?: string): voidresumeQueueWorkers
Method
resumeQueueWorkers(queueName: string): voidresumeSubscriptionConsumer
Method
resumeSubscriptionConsumer(registrationKey: string): Promise<void>start
Method
start(): Promise<void>Start the service
startActiveSpan
Method
startActiveSpan<F>(name: string, opts: SpanOptions, context: Context | undefined, fn: (span: Span) => Promise<F>): Promise<F>Start a new active opentelemetry span with given options. A active span will be below the current span in hierarchy
wrapInSpan
Method
wrapInSpan<F>(name: string, opts: SpanOptions, fn: (span: Span) => Promise<F>, context?: Context): Promise<F>Wrap the given function in an OpenTelemetry span. The span will be on same hierarchy level as the current span.