1+ syntax = "proto3" ;
2+
3+ package temporal.api.worker.v1 ;
4+
5+ option go_package = "go.temporal.io/api/worker/v1;worker" ;
6+ option java_package = "io.temporal.api.worker.v1" ;
7+ option java_multiple_files = true ;
8+ option java_outer_classname = "WorkerNexusServiceCommandsProto" ;
9+ option ruby_package = "Temporalio::Api::Worker::V1" ;
10+ option csharp_namespace = "Temporalio.Api.Worker.V1" ;
11+
12+ import "google/protobuf/field_mask.proto" ;
13+ import "temporal/api/sdk/v1/worker_config.proto" ;
14+
15+ // (--
16+ /////////////////////////////////////////////////////////////////////
17+ // This file contains:
18+ // - Conventions between server and worker.
19+ // - Definitions for commands and payloads for server-worker communication via Nexus
20+ //
21+ // WORKER COMMANDS AND CONVENTIONS:
22+ //
23+ // Worker commands are used to manage worker configurations, operations, etc.
24+ // Command names should match names defined in the server API.
25+ // Currently supported commands:
26+ // - FetchWorkerConfig
27+ // - UpdateWorkerConfig.
28+ //
29+ // Command names are provided in StartOperationRequest.Operation field.
30+ //
31+ // PAYLOAD CONVENTIONS:
32+ //
33+ // In/out payloads namings follow the same convention as the regular API:
34+ // - CommandNameRequest (input payload)
35+ // - CommandNameResponse (output payload).
36+ // - Empty payload if response is not needed/not expected
37+ //
38+ // COMMUNICATION PROTOCOL:
39+ // - Transport: Nexus messages on dedicated channel
40+ // - Server identifier: "sys-worker-service"
41+ // - Task queue: "temporal-sys/worker-tq/{namespace_name}/{process_key}"
42+ // --)
43+
44+ // Will be send to the worker as a payload of the FetchWorkerConfig command.
45+ message FetchWorkerConfigRequest {
46+ // List of worker identifiers. For now only a single worker instance key is supported.
47+ repeated string worker_instance_key = 1 ;
48+ }
49+
50+ message FetchWorkerConfigResponse {
51+ message WorkerConfigEntry {
52+ // Worker instance key the config is for.
53+ string worker_instance_key = 1 ;
54+
55+ temporal.api.sdk.v1.WorkerConfig worker_config = 2 ;
56+ }
57+ repeated WorkerConfigEntry worker_configs = 1 ;
58+ }
59+
60+ // Will be send to the worker as a payload of the UpdateWorkerConfig command.
61+ message UpdateWorkerConfigRequest {
62+ // List of worker identifiers.
63+ repeated string worker_instance_key = 1 ;
64+
65+ // The new worker config to be applied.
66+ temporal.api.sdk.v1.WorkerConfig worker_config = 2 ;
67+
68+ // Controls which fields from `worker_config` will be applied
69+ google.protobuf.FieldMask update_mask = 3 ;
70+ }
71+
72+ message UpdateWorkerConfigResponse {
73+ }
0 commit comments