Add watch stream protocol
This commit is contained in:
@@ -5,9 +5,11 @@ package quixos.orch;
|
||||
import "camino/api.proto";
|
||||
import "quixos/package.proto";
|
||||
import "quixos/refs.proto";
|
||||
import "quixos/runtime.proto";
|
||||
|
||||
service OrchestratorRuntime {
|
||||
rpc InvokeFunction(InvokeFunctionRequest) returns (InvokeFunctionResponse);
|
||||
rpc WatchFunction(WatchFunctionRequest) returns (stream WatchFunctionEvent);
|
||||
rpc ListPackageDescriptors(ListPackageDescriptorsRequest) returns (ListPackageDescriptorsResponse);
|
||||
rpc ListPackageRuntimes(ListPackageRuntimesRequest) returns (ListPackageRuntimesResponse);
|
||||
rpc ListActivations(ListActivationsRequest) returns (ListActivationsResponse);
|
||||
@@ -28,6 +30,22 @@ message InvokeFunctionResponse {
|
||||
string error = 5;
|
||||
}
|
||||
|
||||
message WatchFunctionRequest {
|
||||
quixos.FunctionRef function = 1;
|
||||
string object_id = 2;
|
||||
map<string, camino.Value> input = 3;
|
||||
}
|
||||
|
||||
message WatchFunctionEvent {
|
||||
string invocation_id = 1;
|
||||
Activation activation = 2;
|
||||
string watch_id = 3;
|
||||
camino.Value value = 4;
|
||||
repeated quixos.runtime.DerivedDependency dependencies = 5;
|
||||
string error = 6;
|
||||
bool initial = 7;
|
||||
}
|
||||
|
||||
message ListActivationsRequest {}
|
||||
|
||||
message ListPackageDescriptorsRequest {}
|
||||
|
||||
@@ -8,6 +8,7 @@ import "quixos/refs.proto";
|
||||
service PackageRuntime {
|
||||
rpc Handshake(HandshakeRequest) returns (HandshakeResponse);
|
||||
rpc Invoke(InvokeRequest) returns (InvokeResponse);
|
||||
rpc Watch(WatchRequest) returns (stream WatchEvent);
|
||||
}
|
||||
|
||||
message HandshakeRequest {
|
||||
@@ -33,3 +34,25 @@ message InvokeResponse {
|
||||
camino.Value result = 2;
|
||||
string error = 3;
|
||||
}
|
||||
|
||||
message WatchRequest {
|
||||
string invocation_id = 1;
|
||||
quixos.FunctionRef function = 2;
|
||||
string object_id = 3;
|
||||
map<string, camino.Value> input = 4;
|
||||
}
|
||||
|
||||
message DerivedDependency {
|
||||
string kind = 1;
|
||||
string object_id = 2;
|
||||
string field_name = 3;
|
||||
string source_field = 4;
|
||||
}
|
||||
|
||||
message WatchEvent {
|
||||
string watch_id = 1;
|
||||
camino.Value value = 2;
|
||||
repeated DerivedDependency dependencies = 3;
|
||||
string error = 4;
|
||||
bool initial = 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user