Restate Typescript SDK
    Preparing search index...

    Type Alias RunOptions<T>

    type RunOptions<T> = {
        initialRetryInterval?: Duration | number;
        maxRetryAttempts?: number;
        maxRetryDuration?: Duration | number;
        maxRetryInterval?: Duration | number;
        retryIntervalFactor?: number;
        serde?: Serde<T>;
    }

    Type Parameters

    • T
    Index

    Properties

    initialRetryInterval?: Duration | number

    Initial interval for the first retry attempt. Retry interval will grow by a factor specified in retryIntervalFactor.

    The default is 50 milliseconds.

    If a number is provided, it will be interpreted as milliseconds.

    maxRetryAttempts?: number

    Max number of attempts (including the initial), before giving up.

    Must be an integer between 0 and 4294967295 (inclusive). Omit this option to avoid setting an attempt limit. Invalid values abort the invocation attempt before the run is journaled or its action is executed.

    When giving up, ctx.run will throw a TerminalError wrapping the original error message.

    maxRetryDuration?: Duration | number

    Max duration of retries, before giving up.

    When giving up, ctx.run will throw a TerminalError wrapping the original error message.

    If a number is provided, it will be interpreted as milliseconds.

    maxRetryInterval?: Duration | number

    Max interval between retries. Retry interval will grow by a factor specified in retryIntervalFactor.

    The default is 10 seconds.

    If a number is provided, it will be interpreted as milliseconds.

    retryIntervalFactor?: number

    Exponentiation factor to use when computing the next retry delay.

    The default value is 2, meaning retry interval will double at each attempt.

    serde?: Serde<T>