@maschinenlesbar.org/openka-cli
    Preparing search index...

    Interface EngineOptions

    interface EngineOptions {
        baseUrl?: string;
        maxRedirects?: number;
        maxResponseBytes?: number;
        maxRetries?: number;
        minHostIntervalMs?: number;
        now?: () => number;
        onRetry?: (event: RetryEvent) => void;
        pacer?: HostPacer;
        sleep?: (ms: number) => Promise<void>;
        timeoutMs?: number;
        transport?: Transport;
        userAgent?: string;
    }
    Index
    baseUrl?: string
    maxRedirects?: number

    Redirects followed before giving up. 0 surfaces a 3xx as an error.

    maxResponseBytes?: number
    maxRetries?: number
    minHostIntervalMs?: number

    Minimum milliseconds between two requests to the same host.

    now?: () => number

    Injectable clock and sleep, so retry/rate-limit behaviour is testable.

    onRetry?: (event: RetryEvent) => void

    Called once per retry, right before the backoff sleep, for each retried 429/503 and each retried failure; never when there is no retry. A throw is swallowed.

    pacer?: HostPacer

    When each host was last asked, shared with other engines. Unset, the engine keeps its own. Engines that share one never send two requests to one host closer together than the interval of the engine sending the second — what lets ka sync run several sources at once without doubling the load on a host they both reach, such as the Parlamentsspiegel.

    sleep?: (ms: number) => Promise<void>
    timeoutMs?: number
    transport?: Transport
    userAgent?: string