Constructors

Methods

  • Create a worker.

    config carries worker-instance defaults, immutable after creation and delivered to the worker as CloudEvent extension attributes on every triggering event (never process env vars, so values cannot leak between workers co-loaded in one WorkManager process). A worker's own payload field takes precedence; config is the fallback. tags is free-form metadata.

    Both are proto fields 4 and 5 of CreateWorkerRequest. They were absent from this signature, so neither was reachable from TypeScript at all -- callers needing per-worker config had to fall back to the REST gateway.

    Parameters

    • mimeType: string
    • topics: string[]
    • OptionalcodeUrl: string
    • OptionalcodeContent: Uint8Array<ArrayBufferLike>
    • Optionalconfig: Record<string, string>
    • Optionaltags: Record<string, string>

    Returns Promise<CreateWorkerResponse>

  • Parameters

    • id: string

    Returns Promise<Message<"virtufin.DeleteWorkerResponse">>

  • Parameters

    • id: string
    • key: string

    Returns Promise<GetTagResponse>

  • Parameters

    • id: string
    • codeSource: { url: string } | { content: Uint8Array }

    Returns Promise<Message<"virtufin.LoadCodeResponse">>

  • Parameters

    • id: string
    • key: string
    • value: string

    Returns Promise<Message<"virtufin.SetTagResponse">>

  • Parameters

    • id: string
    • tags: Record<string, string>

    Returns Promise<Message<"virtufin.SetTagsResponse">>

  • Parameters

    • id: string

    Returns Promise<Message<"virtufin.StartWorkerResponse">>

  • Parameters

    • id: string

    Returns Promise<Message<"virtufin.StopWorkerResponse">>