Setu-TS
    Preparing search index...

    Interface CqrsPluginOptions

    Options for CqrsPlugin.

    0.1.0

    interface CqrsPluginOptions {
        behaviors?: readonly (
            | IPipelineBehavior<CqrsRequest<unknown>, unknown>
            | RegistryFactory<IPipelineBehavior<CqrsRequest<unknown>, unknown>>
        )[];
        commandHandlers?: readonly CommandHandlerRegistration[];
        queryHandlers?: readonly QueryHandlerRegistration[];
    }
    Index
    behaviors?: readonly (
        | IPipelineBehavior<CqrsRequest<unknown>, unknown>
        | RegistryFactory<IPipelineBehavior<CqrsRequest<unknown>, unknown>>
    )[]

    Pipeline behaviors applied to every command and query execution.

    Behaviors are invoked in declared order. Each behavior receives the request and a next() function; returning without calling next() short-circuits the pipeline (the handler and later behaviors do not run).

    An entry is either a behavior instance or a factory that builds one from the service registry. At the onInit phase the WHOLE list is resolved in declared order and installed on both buses, so a mixed list runs in declared order — not instances-then-factories.

    Default: [] (no behaviors).

    commandHandlers?: readonly CommandHandlerRegistration[]

    Command handlers registered on the command bus at register() time.

    The declarative alternative to resolving CAPABILITIES.COMMAND_BUS and calling register imperatively — which application code has no phase to do, since IApplication exposes no lifecycle hooks and the bus does not exist until the plugin has registered.

    Default: [] (no handlers).

    0.1.0

    queryHandlers?: readonly QueryHandlerRegistration[]

    Query handlers registered on the query bus at register() time.

    Default: [] (no handlers).

    0.1.0