Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @tmorin/ceb-messaging-core

Index

Type aliases

ActionKind

ActionKind: "command" | "query"

The kind of action message.

ActionResult

ActionResult<R>: R | EmptyResult

The result of an action.

Type parameters

CommandBusNotificationMap

CommandBusNotificationMap: { command_handler_failed: { bus: CommandBus; command: Command; error: Error }; command_handler_not_found: { bus: CommandBus; command: Command; error: Error }; command_received: { bus: CommandBus; command: Command }; disposed: { bus: CommandBus } }

The map defines the internal events of an CommandBus.

Type declaration

CommandHandlerOutput

CommandHandlerOutput<R, Es>: CommandHandlerOutputSync<R, Es> | CommandHandlerOutputAsync<R, Es>

The output of a CommandHandler.

Type parameters

CommandHandlerOutputAsync

CommandHandlerOutputAsync<R, Es>: Promise<CommandHandlerOutputSync<R, Es>>

The asynchronous output of a CommandHandler.

Type parameters

  • R: Result

    the type of the result

  • Es: Event[] = []

    the type of the events

CommandHandlerOutputSync

CommandHandlerOutputSync<R, Es>: void | { events?: Es; result?: R }

The synchronous output of a CommandHandler.

Type parameters

  • R: Result

    the type of the result

  • Es: Event[] = []

    the type of the events

CommandKind

CommandKind: "command"

The kind of command message.

CommandResult

CommandResult<R>: ActionResult<R>

The result of a command.

Type parameters

EmittableGateway

The observable view of a gateway merges the observable channel of all buses.

EmptyResult

EmptyResult<H>: Result<undefined, H>

An empty result is a result which doesn't provide any value.

Type parameters

EventBusNotificationMap

EventBusNotificationMap: { disposed: { bus: EventBus }; event_listener_failed: { bus: EventBus; error: Error; event: Event }; event_received: { bus: EventBus; event: Event } }

The map defines the internal events of an EventBus.

Type declaration

EventKind

EventKind: "event"

The kind of event message.

ExecuteActionOptions

ExecuteActionOptions: { timeout: number }

The options to execute an action.

Type declaration

  • timeout: number

    The maximum time in millisecond to wait fore a result.

GatewayNotificationMap

The map defines the internal events of all buses.

MessageHeaderValue

MessageHeaderValue: string | number | boolean | (string | number | boolean)[]

The value of a header.

MessageHeaders

MessageHeaders: { messageId: MessageId; messageType: MessageType }

The headers of the a message.

Type declaration

MessageId

MessageId: string

The identifier of a message.

MessageKind

MessageKind: "command" | "query" | "result" | "event"

The kind of message.

MessageType

MessageType: string

The type of a message.

ObservableGateway

The observable view of a gateway merges the observable channel of all buses.

QueryBusNotificationMap

QueryBusNotificationMap: { disposed: { bus: QueryBus }; query_handler_failed: { bus: QueryBus; error: Error; query: Query }; query_handler_not_found: { bus: QueryBus; error: Error; query: Query }; query_received: { bus: QueryBus; query: Query } }

The map defines the internal events of an QueryBus.

Type declaration

QueryKind

QueryKind: "query"

The kind of query message.

QueryOutput

QueryOutput<R>: QueryResult<R> | Promise<QueryResult<R>>

The output of a query handler.

Type parameters

QueryResult

QueryResult<R>: ActionResult<R>

The result of query.

Type parameters

ResultHeaders

ResultHeaders: MessageHeaders & { originalMessageId: string }

The header of a result message.

ResultKind

ResultKind: "result"

The kind of result message.

Variables

CommandBusSymbol

CommandBusSymbol: typeof CommandBusSymbol = ...

The symbol used to register CommandBus.

EventBusSymbol

EventBusSymbol: typeof EventBusSymbol = ...

The symbol used to register EventBus.

GatewayEmitterSymbol

GatewayEmitterSymbol: typeof GatewayEmitterSymbol = ...

The symbol used to register EmittableGateway.

GatewayObserverSymbol

GatewayObserverSymbol: typeof GatewayObserverSymbol = ...

The symbol used to register ObservableGateway.

GatewaySymbol

GatewaySymbol: typeof GatewaySymbol = ...

The symbol used to register Gateway.

QueryBusSymbol

QueryBusSymbol: typeof QueryBusSymbol = ...

The symbol used to register QueryBus.

Generated using TypeDoc