Type alias Options

Options: {
    __resonate: true;
    durable: boolean;
    eidFn: ((id) => string);
    encoder: IEncoder<unknown, string | undefined>;
    idempotencyKeyFn: ((id) => string);
    pollFrequency: number;
    retryPolicy: RetryPolicy;
    shouldLock: boolean | undefined;
    tags: Record<string, string>;
    timeout: number;
    version: number;
}

Resonate function invocation options.

Type declaration

  • __resonate: true
  • durable: boolean

    Persist the result to durable storage.

  • eidFn: ((id) => string)

    A function that calculates the id for this execution defaults to a random funciton.

      • (id): string
      • Parameters

        • id: string

        Returns string

  • encoder: IEncoder<unknown, string | undefined>

    Overrides the default encoder.

  • idempotencyKeyFn: ((id) => string)

    Overrides the default funciton to calculate the idempotency key. defaults to a variation fnv-1a the hash funciton.

      • (id): string
      • Parameters

        • id: string

        Returns string

  • pollFrequency: number

    Overrides the default polling frequency.

  • retryPolicy: RetryPolicy

    Overrides the default retry policy.

  • shouldLock: boolean | undefined

    Acquire a lock for the execution.

  • tags: Record<string, string>

    Additional tags to add to the durable promise.

  • timeout: number

    Overrides the default timeout.

  • version: number

    The function version to execute. Only applicable on calls to resonate.run.