Interface IPipelineSchema<Payload>

Defines the schema for a pipeline, including execution logic and optional callbacks.

interface IPipelineSchema<Payload extends object = any> {
    callbacks?: Partial<IPipelineCallbacks<Payload>>;
    execute: <T = any>(
        clientId: string,
        agentName: string,
        payload: Payload,
    ) => Promise<void | T>;
    pipelineName: string;
}

Type Parameters

  • Payload extends object = any

Properties

callbacks?: Partial<IPipelineCallbacks<Payload>>

Optional callbacks for pipeline lifecycle events. Provides hooks for monitoring pipeline execution, handling errors, and customizing behavior.

execute: <T = any>(
    clientId: string,
    agentName: string,
    payload: Payload,
) => Promise<void | T>

Function to execute the pipeline logic.

pipelineName: string

The name of the pipeline.