Skip to main content

AggregatedPipeline <Ctx, Input, Output>

Hierarchy

Index

Events

readonlyonAfterRun

onAfterRun: Event<unknown[], string> = ...

Called after the pipeline executes work units.

readonlyonBeforeRun

onBeforeRun: Event<[Input], string> = ...

Called before the pipeline executes work units.

readonlyonRunWorkUnit

onRunWorkUnit: Event<[WorkUnit<{}, Input, Output>, Input], string> = ...

Called before a single work unit is executed.

Other

constructor

  • new AggregatedPipeline<Ctx, Input, Output>(context: Ctx, value?: Input, options?: {}): AggregatedPipeline<Ctx, Input, Output>
  • Type parameters

    • Ctx: Context
    • Input = unknown
    • Output = Input

readonlycontext

context: Ctx

readonlydebug

debug: Debugger

depth

depth: number = 0

index

index: number = 0

readonlyoptions

options: Readonly<Required<{}>>

Validated and configured options.

readonlyvalue

value: Input

id

  • get id(): string
  • Return a unique hierarchical ID.

add

  • add(title: string, action: Action<Ctx, Input, Output>, scope?: unknown): this
  • add(workUnit: WorkUnit<{}, Input, Output>): this
  • Add a work unit to the list of items to process.

blueprint

  • blueprint(schemas: __module): object

configure

  • configure(options?: Partial<{}> | (options: Required<{}>) => Partial<{}>): Readonly<Required<{}>>
  • Set an options object by merging the new partial and existing options with the defined blueprint, while running all validation checks. Freeze and return the options object.

    object.configure({ name: 'Boost' });

    object.configure((prevOptions) => ({
    nestedObject: {
    ...prevOptions.nestedObject,
    some: 'value',
    },
    }));

getWorkUnits

  • getWorkUnits(): WorkUnit<{}, Input, Output>[]
  • Return a list of registered work units for the current pipeline.

monitor

  • Monitor all hierarchical pipelines, routines, and tasks being executed, by listening to all applicable events.

run

  • Execute all work units in parallel with a value being passed to each work unit. Work units will synchronize regardless of race conditions and errors.