Interfaces · @purista/core
ServiceClass
The ServiceClass interface
Signature
interface ServiceClass<S> Properties
3 entries
__serviceClassTypes
Property
__serviceClassTypes: S Type-only anchor used to preserve cascading service builder types.
config
Property
config: S["ConfigType"] resources
Property
resources: S["Resources"] 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(): InFlightDiagnostics getPausedSubscriptionConsumerState
Method
getPausedSubscriptionConsumerState(): PausedSubscriptionConsumersByRegistrationKey getQueueWorkerPauseState
Method
getQueueWorkerPauseState(): QueueWorkerPauseStateByQueue getServiceHealth
Method
getServiceHealth(): Promise<ServiceHealthState> getTracer
Method
getTracer(): Tracer get the opentelemetry tracer of the service
pauseQueueWorkers
Method
pauseQueueWorkers(queueName: string, reason?: string): void resumeQueueWorkers
Method
resumeQueueWorkers(queueName: string): void resumeSubscriptionConsumer
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.