Documentation
    Preparing search index...
    interface ActorDriver {
        getContext(actorId: string): unknown;
        getDatabase(actorId: string): Promise<unknown>;
        getExtraActorLogParams?(): Record<string, string>;
        kvBatchDelete(
            actorId: string,
            keys: Uint8Array<ArrayBufferLike>[],
        ): Promise<void>;
        kvBatchGet(
            actorId: string,
            keys: Uint8Array<ArrayBufferLike>[],
        ): Promise<(Uint8Array<ArrayBufferLike> | null)[]>;
        kvBatchPut(
            actorId: string,
            entries: [Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>][],
        ): Promise<void>;
        kvListPrefix(
            actorId: string,
            prefix: Uint8Array,
        ): Promise<[Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>][]>;
        loadActor(actorId: string): Promise<AnyActorInstance>;
        serverlessHandleStart?(c: Context): Promise<Response>;
        setAlarm(actor: AnyActorInstance, timestamp: number): Promise<void>;
        shutdownRunner?(immediate: boolean): Promise<void>;
        startSleep?(actorId: string): void;
    }
    Index

    Methods

    • Batch read multiple keys. Returns null for keys that don't exist.

      Parameters

      • actorId: string
      • keys: Uint8Array<ArrayBufferLike>[]

      Returns Promise<(Uint8Array<ArrayBufferLike> | null)[]>

    • Batch write multiple key-value pairs. Keys and values are Uint8Arrays.

      Parameters

      • actorId: string
      • entries: [Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>][]

      Returns Promise<void>

    • List all keys with a given prefix.

      Parameters

      • actorId: string
      • prefix: Uint8Array

      Returns Promise<[Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>][]>