Type Alias CreateWorkerRequest

CreateWorkerRequest: Message<"virtufin.CreateWorkerRequest"> & {
    codeSource?: CodeSource;
    config: { [key: string]: string };
    mimeType: string;
    secrets: { [key: string]: string };
    shard: string;
    shardIndex: number;
    shardSize: number;
    tags: { [key: string]: string };
    topics: string[];
}

Type declaration

  • OptionalcodeSource?: CodeSource

    from field: virtufin.CodeSource code_source = 1;

  • config: { [key: string]: string }

    Worker-instance defaults, immutable after creation. Delivered to the worker on every incoming trigger CloudEvent as extension attributes (the same generic mechanism used for correlationid) -- NOT process environment variables, so values never leak between workers co-loaded in the same WorkManager process. A worker's own payload field (if present on the triggering event) takes precedence; config is only the fallback.

    from field: map<string, string> config = 4;

  • mimeType: string

    from field: string mime_type = 2;

  • secrets: { [key: string]: string }

    Secrets by reference: extension-attribute name -> key of the deployment's worker secret (a Dapr secret store; see docs/v1/worker-secrets.md). Only the references are persisted and returned by ListWorkers. The Runtime resolves the values in memory and stamps them onto every triggering CloudEvent like config, overriding an attribute of the same name on the event, and drops them from the worker's outputs. A name must not also be a config key. Runtime-hosted worker types only.

    from field: map<string, string> secrets = 6;

  • shard: string

    Sharding. Workers created with the same shard name and size split the events of every topic they share: each event is handled by exactly one member (not a broker consumer group; see docs/v1/delivery.md). Empty shard = a dedicated worker (broadcast, the default).

    from field: string shard = 7;

  • shardIndex: number

    This member's slot in [0, shard_size). Must be unique among live members that share a topic; StartWorker refuses a duplicate.

    from field: uint32 shard_index = 9;

  • shardSize: number

    The shard's member count. Every live member must use the same value: the event's slot is hash(subject or id) % shard_size.

    from field: uint32 shard_size = 8;

  • tags: { [key: string]: string }

    from field: map<string, string> tags = 5;

  • topics: string[]

    One or more topics the worker subscribes to. A triggering CloudEvent arriving on any of them is dispatched to this worker.

    from field: repeated string topics = 3;

from message virtufin.CreateWorkerRequest