Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

Add service key and new descriptor format #68

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions deployment_manifest_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"$id": "https://restate.dev/deployment.manifest.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"title": "Deployment",
"description": "Restate deployment manifest",
"properties": {
"protocolMode": {
"title": "ProtocolMode",
"enum": ["BIDI_STREAM", "REQUEST_RESPONSE"]
},
"minProtocolVersion": {
"type": "integer",
"minimum": 0
},
"maxProtocolVersion": {
"type": "integer",
"maximum": 0
},
"components": {
"type": "array",
"items": {
"type": "object",
"title": "Component",
"properties": {
"fullyQualifiedComponentName": {
"type": "string",
"pattern": "^[a-zA-Z]+[a-zA-Z0-9._-]*$"
},
"componentType": {
"title": "ComponentType",
"enum": ["VIRTUAL_OBJECT", "SERVICE"]
},
"handlers": {
"type": "array",
"items": {
"type": "object",
"title": "Handler",
"properties": {
"name": {
"type": "string",
"pattern": "^[a-zA-Z]+[a-zA-Z0-9_-]*$"
},
"inputSchema": {},
"outputSchema": {}
},
"required": [ "name" ],
"additionalProperties": false
}
}
},
"required": [ "fullyQualifiedComponentName","componentType", "handlers" ],
"additionalProperties": false
}
}
},
"required": [ "minProtocolVersion", "maxProtocolVersion", "components" ],
"additionalProperties": false
}
9 changes: 9 additions & 0 deletions dev/restate/service/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ message StartMessage {
bool partial_state = 5;

repeated Header headers = 6;

// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
string key = 7;
}

// Type: 0x0000 + 1
Expand Down Expand Up @@ -200,6 +203,9 @@ message InvokeEntryMessage {

repeated Header headers = 4;

// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
string key = 5;

oneof result {
bytes value = 14;
Failure failure = 15;
Expand All @@ -222,6 +228,9 @@ message BackgroundInvokeEntryMessage {
uint64 invoke_time = 4;

repeated Header headers = 5;

// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise.
string key = 6;
}

// Completable: Yes
Expand Down
Loading