Interface DemoCapabilityOptions

Server dependencies. Cleanup must be idempotent and positively acknowledge worker and content fencing.

interface DemoCapabilityOptions {
    store: IDemoRunStore;
    policy: DemoPolicy;
    issuer: string;
    audience: string;
    scopeRef: string;
    now(): number;
    cleanup(input): Promise<{
        connectedSeconds: number;
    }>;
}

Methods

  • Resolves pending creation by operationId, prevents any subsequent dispatch, stops the worker, fences delayed events and, for purge, revokes content and completes deletion. Return only after those effects are acknowledged. Serialize with prepared creation using the host's owner lock.

    Parameters

    • input: {
          operationId: string;
          runId?: string;
          action: "stop" | "purge";
          generation: number;
      }
      • operationId: string
      • Optional runId?: string
      • action: "stop" | "purge"
      • generation: number

    Returns Promise<{
        connectedSeconds: number;
    }>

Properties

policy: DemoPolicy
issuer: string
audience: string
scopeRef: string