forked from apache/beam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#15614 from [BEAM-12953] [Playground] Create…
… protobuf file for front-back communication * Add protofile * Fix typos. * add proto/grpc as dependencies * Change protobuf file * Renamed some fields and inserted SDK_UNSPECIFIED status * Refactoring proto file * Change int32 pipeline_id to string pipeline_uuid * Edit comments for some messages. Co-authored-by: gravicapa <dasha.m91@gmail.com> Co-authored-by: Ilya Kozyrev <ilya.kozyrev@akvelon.com> Co-authored-by: Pavel Avilov <avilovpavel6@gmail.com>
- Loading branch information
1 parent
b756117
commit f4062f8
Showing
2 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/apache/beam/playground/v1;playground"; | ||
package playground.v1; | ||
|
||
enum Sdk { | ||
SDK_UNSPECIFIED = 0; | ||
SDK_JAVA = 1; | ||
SDK_GO = 2; | ||
SDK_PYTHON = 3; | ||
SDK_SCIO = 4; | ||
} | ||
|
||
enum Status { | ||
STATUS_UNSPECIFIED = 0; | ||
STATUS_EXECUTING = 1; | ||
STATUS_FINISHED = 2; | ||
STATUS_ERROR = 3; | ||
} | ||
|
||
// RunCodeRequest represents a code text and options of SDK which executes the code. | ||
message RunCodeRequest { | ||
string code = 1; | ||
Sdk sdk = 2; | ||
} | ||
|
||
// RunCodeResponse contains information of the pipeline uuid. | ||
message RunCodeResponse { | ||
string pipeline_uuid = 1; | ||
} | ||
|
||
// CheckStatusRequest contains information of the pipeline uuid. | ||
message CheckStatusRequest { | ||
string pipeline_uuid = 1; | ||
} | ||
|
||
// StatusInfo contains information about the status of the code execution. | ||
message CheckStatusResponse { | ||
Status status = 1; | ||
} | ||
|
||
// GetCompileOutputRequest contains information of the pipeline uuid. | ||
message GetCompileOutputRequest { | ||
string pipeline_uuid = 1; | ||
} | ||
|
||
// GetCompileOutputResponse represents the result of the compiled code. | ||
message GetCompileOutputResponse { | ||
string output = 1; | ||
Status compilation_status = 2; | ||
} | ||
|
||
// GetRunOutputRequest contains information of the pipeline uuid. | ||
message GetRunOutputRequest { | ||
string pipeline_uuid = 1; | ||
} | ||
|
||
// RunOutputResponse represents the result of the executed code. | ||
message GetRunOutputResponse { | ||
string output = 1; | ||
Status compilation_status = 2; | ||
} | ||
|
||
service PlaygroundService { | ||
|
||
// Submit the job for an execution and get the pipeline uuid. | ||
rpc RunCode(RunCodeRequest) returns (RunCodeResponse); | ||
|
||
// Get the status of pipeline execution. | ||
rpc CheckStatus(CheckStatusRequest) returns (CheckStatusResponse); | ||
|
||
// Get the result of pipeline execution. | ||
rpc GetRunOutput(GetRunOutputRequest) returns (GetRunOutputResponse); | ||
|
||
// Get the result of pipeline compilation. | ||
rpc GetCompileOutput(GetCompileOutputRequest) returns (GetCompileOutputResponse); | ||
} |