createPipelineRunner
createPipelineRunner(
originalMethod,meta,behaviors,hasPipeline,sources?):PipelineRunner
Defined in: packages/pipeline/src/services/pipeline-runner.ts:47
Builds the runner of one handler: each call creates a pipeline context, takes the
tenant and correlation id from sources or the enclosing pipeline, composes the
behaviors around the handler, and runs them inside those values. Framework adapters
use it; createPipeline() is the entry point for applications.
Parameters
Section titled “Parameters”originalMethod
Section titled “originalMethod”(this, …args) => unknown
PipelineHandlerMeta | ((request, self) => PipelineHandlerMeta)
Fixed handler metadata, or a function deriving it from the request and the receiver of the call.
behaviors
Section titled “behaviors”readonly IPipelineBehavior<unknown, unknown>[] | ((self, request) => Promise<IPipelineBehavior<unknown, unknown>[]>)
Resolved instances, or a resolver called per execution (a framework adapter’s request-scoped instances).
hasPipeline
Section titled “hasPipeline”boolean
sources?
Section titled “sources?”ContextSources = {}
Returns
Section titled “Returns”Example
Section titled “Example”const run = createPipelineRunner(handler.execute, meta, [logging], true, sources);await run(handler, command);