mogami-stream - v0.4.0
    Preparing search index...

    Interface KeyedRouteOptions<T, K>

    Options for executing a stream pipeline.

    interface KeyedRouteOptions<T, K extends string> {
        branches: readonly K[];
        capacity: number;
        default?: NoInfer<K>;
        fallback?: "error" | "ignore";
        select: (
            value: T,
            context: OperatorContext,
        ) => NoInfer<K> | PromiseLike<NoInfer<K>>;
        signal?: AbortSignal;
    }

    Type Parameters

    • T
    • K extends string

    Hierarchy (View Summary)

    Index
    branches: readonly K[]

    Non-empty, unique string keys, captured at construction.

    capacity: number

    Positive safe integer limiting each branch queue, excluding the coordinator's single item.

    default?: NoInfer<K>

    Existing branch to use if the selected destination departs.

    fallback?: "error" | "ignore"

    Handles items with no active destination after trying default. Defaults to "ignore".

    select: (
        value: T,
        context: OperatorContext,
    ) => NoInfer<K> | PromiseLike<NoInfer<K>>
    signal?: AbortSignal

    External AbortSignal to cancel the execution. If already aborted, the source is never opened.