crnt - v0.0.31
    Preparing search index...

    Interface StreamConfig

    Default configuration options that can be applied to all stream operations.

    interface StreamConfig {
        batchDelay?: number;
        batchSize?: number;
        concurrency?: number;
        preserveOrder?: boolean;
        signal?: AbortSignal;
        timeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    batchDelay?: number

    Timeout in milliseconds to flush incomplete batches.

    When specified, incomplete batches will be flushed and processed after this timeout, even if they haven't reached the target batchSize. Useful for handling slow or irregular input streams.

    batchSize?: number

    Maximum number of items per batch.

    concurrency?: number

    Maximum number of concurrent tasks.

    • For map(): Controls how many individual items are processed concurrently
    • For mapBatch(): Controls how many batches are processed concurrently
    1
    
    preserveOrder?: boolean

    Whether to preserve the order of results.

    When true, results are yielded in the same order as the input items, which may reduce throughput as processing waits for earlier items to complete. When false, results are yielded as soon as they're available.

    false
    
    signal?: AbortSignal

    same signature as fetch(), but for aborting operations. If provided, the operation will be aborted when the signal is aborted.

    timeout?: number

    timeout in milliseconds. This works in tandem with the signal option, whichever triggers first (signal or timeout) will abort the operation.