Skip to content

Commit fb1759a

Browse files
Merge commit '0a2f4c9ab5468834bf3fcf5b20c052161415519c'
2 parents e8da6fa + 0a2f4c9 commit fb1759a

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$id": "https://restate.dev/deployment.manifest.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"type": "object",
5+
"title": "Deployment",
6+
"description": "Restate deployment manifest",
7+
"properties": {
8+
"protocolMode": {
9+
"title": "ProtocolMode",
10+
"enum": ["BIDI_STREAM", "REQUEST_RESPONSE"]
11+
},
12+
"minProtocolVersion": {
13+
"type": "integer",
14+
"minimum": 0
15+
},
16+
"maxProtocolVersion": {
17+
"type": "integer",
18+
"maximum": 0
19+
},
20+
"components": {
21+
"type": "array",
22+
"items": {
23+
"type": "object",
24+
"title": "Component",
25+
"properties": {
26+
"fullyQualifiedComponentName": {
27+
"type": "string",
28+
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9._-]*$"
29+
},
30+
"componentType": {
31+
"title": "ComponentType",
32+
"enum": ["VIRTUAL_OBJECT", "SERVICE"]
33+
},
34+
"handlers": {
35+
"type": "array",
36+
"items": {
37+
"type": "object",
38+
"title": "Handler",
39+
"properties": {
40+
"name": {
41+
"type": "string",
42+
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9_]*$"
43+
},
44+
"inputSchema": {},
45+
"outputSchema": {}
46+
},
47+
"required": [ "name" ],
48+
"additionalProperties": false
49+
}
50+
}
51+
},
52+
"required": [ "fullyQualifiedComponentName","componentType", "handlers" ],
53+
"additionalProperties": false
54+
}
55+
}
56+
},
57+
"required": [ "minProtocolVersion", "maxProtocolVersion", "components" ],
58+
"additionalProperties": false
59+
}

sdk-core/src/main/service-protocol/dev/restate/service/protocol.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ message StartMessage {
3939
// protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
4040
repeated StateEntry state_map = 4;
4141
bool partial_state = 5;
42+
43+
repeated Header headers = 6;
44+
45+
// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
46+
string key = 7;
4247
}
4348

4449
// Type: 0x0000 + 1
@@ -196,6 +201,11 @@ message InvokeEntryMessage {
196201

197202
bytes parameter = 3;
198203

204+
repeated Header headers = 4;
205+
206+
// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
207+
string key = 5;
208+
199209
oneof result {
200210
bytes value = 14;
201211
Failure failure = 15;
@@ -216,6 +226,11 @@ message BackgroundInvokeEntryMessage {
216226
// If this value is not set, equal to 0, or past in time,
217227
// the runtime will execute this BackgroundInvoke as soon as possible.
218228
uint64 invoke_time = 4;
229+
230+
repeated Header headers = 5;
231+
232+
// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
233+
string key = 6;
219234
}
220235

221236
// Completable: Yes
@@ -255,3 +270,8 @@ message Failure {
255270
// Contains a concise error message, e.g. Throwable#getMessage() in Java.
256271
string message = 2;
257272
}
273+
274+
message Header {
275+
string key = 1;
276+
string value = 2;
277+
}

0 commit comments

Comments
 (0)