interface DurableObjectLockOptions
Since 0.2.0

Options for DurableObjectLock.

Properties

readonly
runtime: IRuntimeServices

Runtime services, for minting the lock token.

Required rather than defaulted: a token must come from runtime.uuid() per AI_GUIDELINES ยง4.2, and unlike the Durable Object side, this side does have a plugin context to take one from.

readonly
optional
keyPrefix: string

Prefix applied to every lock key before deriving the object name.

Namespaces this application's locks so a shared Durable Object namespace does not collide with another application's key of the same name.

readonly
optional
binding: string

The Durable Object binding name, used only in error messages.

Usage

import { type DurableObjectLockOptions } from "cloudflare-plugin/src/index.ts";