Skip to content

Commit eebb2c6

Browse files
authored
Add internal callback variant (#438)
1 parent aeba065 commit eebb2c6

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

Diff for: openapi/openapiv2.json

+14
Original file line numberDiff line numberDiff line change
@@ -4653,6 +4653,17 @@
46534653
"type": "object",
46544654
"description": "Trigger for when the workflow is closed."
46554655
},
4656+
"CallbackInternal": {
4657+
"type": "object",
4658+
"properties": {
4659+
"data": {
4660+
"type": "string",
4661+
"format": "byte",
4662+
"description": "Opaque internal data."
4663+
}
4664+
},
4665+
"description": "Callbacks to be delivered internally within the system.\nThis variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error.\nThe only reason that this is exposed is because callbacks are replicated across clusters via the\nWorkflowExecutionStarted event, which is defined in the public API."
4666+
},
46564667
"CallbackNexus": {
46574668
"type": "object",
46584669
"properties": {
@@ -6300,6 +6311,9 @@
63006311
"properties": {
63016312
"nexus": {
63026313
"$ref": "#/definitions/CallbackNexus"
6314+
},
6315+
"internal": {
6316+
"$ref": "#/definitions/CallbackInternal"
63036317
}
63046318
},
63056319
"description": "Callback to attach to various events in the system, e.g. workflow run completion."

Diff for: openapi/openapiv3.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -4572,6 +4572,8 @@ components:
45724572
properties:
45734573
nexus:
45744574
$ref: '#/components/schemas/Callback_Nexus'
4575+
internal:
4576+
$ref: '#/components/schemas/Callback_Internal'
45754577
description: Callback to attach to various events in the system, e.g. workflow run completion.
45764578
CallbackInfo:
45774579
type: object
@@ -4626,6 +4628,18 @@ components:
46264628
type: object
46274629
properties: {}
46284630
description: Trigger for when the workflow is closed.
4631+
Callback_Internal:
4632+
type: object
4633+
properties:
4634+
data:
4635+
type: string
4636+
description: Opaque internal data.
4637+
format: bytes
4638+
description: |-
4639+
Callbacks to be delivered internally within the system.
4640+
This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error.
4641+
The only reason that this is exposed is because callbacks are replicated across clusters via the
4642+
WorkflowExecutionStarted event, which is defined in the public API.
46294643
Callback_Nexus:
46304644
type: object
46314645
properties:

Diff for: temporal/api/common/v1/message.proto

+10
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,18 @@ message Callback {
191191
map<string, string> header = 2;
192192
}
193193

194+
// Callbacks to be delivered internally within the system.
195+
// This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error.
196+
// The only reason that this is exposed is because callbacks are replicated across clusters via the
197+
// WorkflowExecutionStarted event, which is defined in the public API.
198+
message Internal {
199+
// Opaque internal data.
200+
bytes data = 1;
201+
}
202+
194203
reserved 1; // For a generic callback mechanism to be added later.
195204
oneof variant {
196205
Nexus nexus = 2;
206+
Internal internal = 3;
197207
}
198208
}

0 commit comments

Comments
 (0)