Configuration options for the client.
Optionalencryptor?: EncryptorPayload encryptor. Defaults to NoopEncryptor.
Optionalgroup?: stringWorker group name. Defaults to "default".
Optionallogger?: LoggerCustom logger implementation. Defaults to ConsoleLogger.
OptionallogLevel?: LogLevelLog level for the default ConsoleLogger. Defaults to "warn". Takes precedence over verbose.
Optionalnetwork?: NetworkCustom network implementation. Defaults to undefined.
Optionalpid?: stringProcess identifier for the client. Defaults to a random UUID.
Optionalprefix?: stringID prefix applied to generated IDs. Defaults to
process.env.RESONATE_PREFIX when set.
Optionaltimeout?: numberNetwork request timeout. Passed through to HttpNetwork
which falls back to RESONATE_TIMEOUT env var (default: 10s).
Optionaltoken?: stringBearer token for authentication. Passed through to HttpNetwork
which falls back to RESONATE_TOKEN env var.
Optionalttl?: numberTime-to-live (in seconds) for claimed tasks. Defaults to 1 * util.MIN.
Optionalurl?: stringResonate server URL. Falls back to process.env.RESONATE_URL.
If no URL is resolved, a local in-memory network is used.
Optionalverbose?: booleanEnables verbose logging (shorthand for logLevel: "debug"). Defaults to false.
Builds a resolved Options object by merging the provided partial options with the client's defaults.
This is useful for inspecting the effective configuration that would be applied
to a run, rpc, or schedule call, or for passing explicit options to the
convenience methods on a ResonateFunc handle.
Partial options to merge. Supports tags, target, timeout,
version, and retryPolicy.
A fully resolved Options object.
Registers a function with Resonate for execution and version control.
Optionaloptions: { version?: number }Registers a function with Resonate for execution and version control.
Optionaloptions: { version?: number }Creates a recurring schedule that invokes a registered function on a cron interval.
The schedule is persisted on the Resonate Server and triggers a new durable promise for each cron tick. The generated promise IDs include the schedule name and timestamp to ensure uniqueness across invocations.
If a function reference is provided, it must already be registered via register. Alternatively, a function name (string) can be used for remote dispatch.
A ResonateSchedule handle with a delete() method to remove the schedule.
Creates a recurring schedule that invokes a registered function on a cron interval.
The schedule is persisted on the Resonate Server and triggers a new durable promise for each cron tick. The generated promise IDs include the schedule name and timestamp to ensure uniqueness across invocations.
If a function reference is provided, it must already be registered via register. Alternatively, a function name (string) can be used for remote dispatch.
A unique name identifying this schedule.
A cron expression defining the recurrence interval (e.g., "* * * * *" for every minute).
Positional arguments and optional configuration parameters passed to the function.
A ResonateSchedule handle with a delete() method to remove the schedule.
Registers a named dependency that will be available to all Resonate functions
via context.getDependency(name).
Use this to inject services, clients, or configuration objects into Resonate functions without tight coupling.
A unique key identifying the dependency.
The dependency value (any object or primitive).
Stops the Resonate client, releasing all resources.
This shuts down the underlying network transport and message source, stops the
heartbeat loop, and clears the subscription refresh interval. After calling
stop(), the client should not be used for further operations.
Creates a new Resonate client instance.