Skip to content
Snippets Groups Projects

Add server-side scripting to gRPC API

Open Joscha Schmiedt requested to merge f-sss4grpc into dev
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -26,6 +26,7 @@ import "google/protobuf/timestamp.proto";
option java_multiple_files = true;
option java_package = "org.caosdb.api.scripting.v1alpha1";
// A named argument for a script
message NamedArgument {
// The name of the argument
string name = 1;
@@ -33,6 +34,7 @@ message NamedArgument {
string value = 2;
}
// Request to execute a script on the server side
message ExecuteServerSideScriptRequest {
// The script to execute
string script_filename = 1;
@@ -50,6 +52,7 @@ message ExecuteServerSideScriptRequest {
bool run_async = 7;
}
// The result of a script execution
enum ServerSideScriptExecutionResult {
// The result of the script execution is unspecified
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0;
@@ -75,12 +78,13 @@ enum ServerSideScriptExecutionResult {
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10;
}
// IDEA: Give the script execution an id to be able to track it
// Id of a script execution. This is reserved for later releases to track and manage script executions.
message ServerSideScriptExecutionId {
// Id of the script execution
string script_execution_id = 1;
}
// Response to a script execution request
message ExecuteServerSideScriptResponse {
// Id of the script execution
ServerSideScriptExecutionId script_execution_id = 1;
@@ -102,6 +106,7 @@ message ExecuteServerSideScriptResponse {
int64 duration_ms = 9;
}
// Service for server-side scripting
service ServerSideScriptingService {
// Executes a script on the server side
rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {}
Loading