Type alias ResonateOptions

ResonateOptions: {
    auth: AuthOptions;
    encoder: IEncoder<unknown, string | undefined>;
    heartbeat: number;
    logger: ILogger;
    pid: string;
    pollFrequency: number;
    retryPolicy: RetryPolicy;
    store: IStore;
    tags: Record<string, string>;
    timeout: number;
    url: string;
}

Resonate configuration options.

Type declaration

  • auth: AuthOptions

    Store authentication options.

  • encoder: IEncoder<unknown, string | undefined>

    An encoder instance used for encoding and decoding values returned (or thrown) by registered functions. If not provided, a default JSON encoder will be used.

  • heartbeat: number

    The frequency in ms to heartbeat locks.

  • logger: ILogger

    A logger instance, if not provided a default logger will be used.

  • pid: string

    A process id that can be used to uniquely identify this Resonate instance. If not provided a default value will be generated.

  • pollFrequency: number

    The frequency in ms to poll the promise store for remote promises.

  • retryPolicy: RetryPolicy

    A retry policy, defaults to exponential backoff.

  • store: IStore

    A store instance, if provided will take predence over the default store.

  • tags: Record<string, string>

    Tags to add to all durable promises.

  • timeout: number

    The default promise timeout in ms, used for every function executed by calling run. Defaults to 1000.

  • url: string

    The remote promise store url. If not provided, an in-memory promise store will be used.