Home > @idealeap/pipeline > PipeOptions
PipeOptions interface
Options for configuring a pipe.
The PipeOptions interface extends the BatchOptions interface, adding more configurations specific to pipes.
Signature:
typescript
export interface PipeOptions<T, R> extends BatchOptions<T, R>export interface PipeOptions<T, R> extends BatchOptions<T, R>Extends: BatchOptions<T, R>
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| batch? | boolean | (Optional) A flag indicating whether batching should be used. If true, the pipe will handle inputs in batches. | |
| cloneDeep? | boolean | (Optional) | |
| description? | string | (Optional) An optional description of the pipe. | |
| destroyProcess? | () => void | (Optional) An optional function to clean up resources when the pipe is destroyed. | |
| destroyProcessUse? | string | (Optional) The funcName of destroy processing. | |
| errProcess? | (error: any, context: PipelineContext) => MaybePromise<boolean> | (Optional) An optional function to handle errors that occur during the execution of the pipe. | |
| errProcessUse? | string | (Optional) The funcName of error processing. | |
| id | string | A unique identifier for the pipe. | |
| inputs? | Record<string, any> | string | (Optional) The inputs for the pipe. This can either be a record (object) of named inputs, or a string representing a single input value. | |
| params? | Record<string, any> | (Optional) An optional set of parameters to configure the pipe's behavior. | |
| postProcess? | (result: R, context: PipelineContext) => MaybePromise<R> | (Optional) An optional function to postprocess the result data after it's produced by the pipe. | |
| postProcessUse? | string | (Optional) The funcName of postprocessing. | |
| preProcess? | (input: T, context: PipelineContext) => MaybePromise<T> | (Optional) An optional function to preprocess the input data before passing it to the pipe. | |
| preProcessUse? | string | (Optional) The funcName of preprocessing. | |
| retries? | number | (Optional) The number of times to retry the pipe in case of failure. | |
| timeout? | number | (Optional) The maximum duration (in milliseconds) before timing out the pipe. | |
| use? | string | (Optional) An predefined funcName. |