import { OnPipelineEnd, OnPipelineStart, OnStepEnd, OnStepStart, } from '../Types/mod.ts'; import { IContext } from './IContext.ts'; /** * A set of optional hook functions that can be triggered during pipeline execution. * These hooks allow tracing, performance measurement, and logging to be integrated * without altering middleware or handler logic. * * @template TContext - The custom context type used within the application. */ export interface IPipelineHooks { /** * Triggered once before any middleware or handler is executed. */ onPipelineStart?: OnPipelineStart; /** * Triggered immediately before each middleware or handler runs. */ onStepStart?: OnStepStart; /** * Triggered immediately after each middleware or handler has finished executing. */ onStepEnd?: OnStepEnd; /** * Triggered after the entire pipeline completes execution. */ onPipelineEnd?: OnPipelineEnd; }