-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly.
- Loading branch information
Showing
5 changed files
with
177 additions
and
342 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# pythonsdk | ||
Python SDK for gaia pipelines. | ||
|
||
## Upgrade Protc / gRPC | ||
``` | ||
protoc -I . --python_out=. gaiasdk/plugin.proto | ||
python3 -m grpc_tools.protoc -I . --python_out=. --grpc_python_out=. gaiasdk/plugin.proto | ||
``` |
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,59 @@ | ||
// plugin.proto | ||
// Defines the gRPC interface between gaia and the user defined | ||
// pipelines (plugins). All rpc Methods are called from Gaia and | ||
// executed in the plugin. | ||
|
||
syntax = "proto3"; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "io.gaiapipeline.proto"; | ||
option java_outer_classname = "GRPCPlugin"; | ||
|
||
package proto; | ||
|
||
// Job represents a single job | ||
message Job { | ||
uint32 unique_id = 1; | ||
string title = 2; | ||
string description = 3; | ||
repeated uint32 dependson = 4; | ||
repeated Argument args = 5; | ||
ManualInteraction interaction = 6; | ||
} | ||
|
||
// Argument represents an argument passed from a pipeline | ||
// to gaia and/or from gaia to the pipeline. | ||
message Argument { | ||
string description = 1; | ||
string type = 2; | ||
string key = 3; | ||
string value = 4; | ||
} | ||
|
||
// ManualInteraction represents a manual human interaction | ||
message ManualInteraction { | ||
string description = 1; | ||
string type = 2; | ||
string value = 3; | ||
} | ||
|
||
// JobResult represents the result of an executed job | ||
message JobResult { | ||
uint32 unique_id = 1; | ||
bool failed = 2; | ||
bool exit_pipeline = 3; | ||
string message = 4; | ||
} | ||
|
||
// Empty message | ||
message Empty {} | ||
|
||
service Plugin { | ||
// GetJobs returns a stream of Job objects. | ||
// Used to expose jobs to gaia. | ||
rpc GetJobs(Empty) returns (stream Job); | ||
|
||
// ExecuteJob signals the plugin to execute the given job. | ||
// Used to execute one job from a pipeline. | ||
rpc ExecuteJob(Job) returns (JobResult); | ||
} |
Oops, something went wrong.