Skip to content

PURISTA API


PURISTA API / @purista/core / ServiceEventsInternal

Type Alias: ServiceEventsInternal

ServiceEventsInternal = object

Defined in: packages/core/src/core/types/ServiceEvents.ts:54

Events which can be emitted by a service. Internal events are prefixed with service-.

Response messages, which have an event name assigned, are prefixed with custom- If you like to use your own events, the event name must be prefixed with misc-.

Properties

service-available

service-available: undefined

Defined in: packages/core/src/core/types/ServiceEvents.ts:63

emitted when the service is fully initialized and ready Should be emitted by custom service class. It is not emitted by default


service-drain

service-drain: undefined

Defined in: packages/core/src/core/types/ServiceEvents.ts:66

emitted when the service is going to be stopped


service-handled-command-error

service-handled-command-error: object

Defined in: packages/core/src/core/types/ServiceEvents.ts:78

emitted when a command throws a HandledError

commandName

commandName: string

error

error: HandledError

traceId?

optional traceId: TraceId


service-handled-subscription-error

service-handled-subscription-error: object

Defined in: packages/core/src/core/types/ServiceEvents.ts:75

emitted when a subscription throws a HandledError

error

error: HandledError

subscriptionName

subscriptionName: string

traceId?

optional traceId: TraceId


service-not-available

service-not-available: undefined | unknown

Defined in: packages/core/src/core/types/ServiceEvents.ts:72

emitted when the service is not available (for example database connection could not be established)


service-started

service-started: undefined

Defined in: packages/core/src/core/types/ServiceEvents.ts:56

emitted when the service is started, but not fully initialized and not ready yet


service-stopped

service-stopped: undefined

Defined in: packages/core/src/core/types/ServiceEvents.ts:69

emitted when the service has been stopped


service-unhandled-command-error

service-unhandled-command-error: object

Defined in: packages/core/src/core/types/ServiceEvents.ts:84

emitted when a command throws an error other than a HandledError

commandName

commandName: string

error

error: unknown

traceId?

optional traceId: TraceId


service-unhandled-subscription-error

service-unhandled-subscription-error: object

Defined in: packages/core/src/core/types/ServiceEvents.ts:81

emitted when a subscription throws an error other than a HandledError

error

error: unknown

subscriptionName

subscriptionName: string

traceId?

optional traceId: TraceId