File tree 5 files changed +177
-342
lines changed
5 files changed +177
-342
lines changed Original file line number Diff line number Diff line change 1
1
# pythonsdk
2
2
Python SDK for gaia pipelines.
3
+
4
+ ## Upgrade Protc / gRPC
5
+ ```
6
+ protoc -I . --python_out=. gaiasdk/plugin.proto
7
+ python3 -m grpc_tools.protoc -I . --python_out=. --grpc_python_out=. gaiasdk/plugin.proto
8
+ ```
Original file line number Diff line number Diff line change
1
+ // plugin.proto
2
+ // Defines the gRPC interface between gaia and the user defined
3
+ // pipelines (plugins). All rpc Methods are called from Gaia and
4
+ // executed in the plugin.
5
+
6
+ syntax = "proto3" ;
7
+
8
+ option java_multiple_files = true ;
9
+ option java_package = "io.gaiapipeline.proto" ;
10
+ option java_outer_classname = "GRPCPlugin" ;
11
+
12
+ package proto ;
13
+
14
+ // Job represents a single job
15
+ message Job {
16
+ uint32 unique_id = 1 ;
17
+ string title = 2 ;
18
+ string description = 3 ;
19
+ repeated uint32 dependson = 4 ;
20
+ repeated Argument args = 5 ;
21
+ ManualInteraction interaction = 6 ;
22
+ }
23
+
24
+ // Argument represents an argument passed from a pipeline
25
+ // to gaia and/or from gaia to the pipeline.
26
+ message Argument {
27
+ string description = 1 ;
28
+ string type = 2 ;
29
+ string key = 3 ;
30
+ string value = 4 ;
31
+ }
32
+
33
+ // ManualInteraction represents a manual human interaction
34
+ message ManualInteraction {
35
+ string description = 1 ;
36
+ string type = 2 ;
37
+ string value = 3 ;
38
+ }
39
+
40
+ // JobResult represents the result of an executed job
41
+ message JobResult {
42
+ uint32 unique_id = 1 ;
43
+ bool failed = 2 ;
44
+ bool exit_pipeline = 3 ;
45
+ string message = 4 ;
46
+ }
47
+
48
+ // Empty message
49
+ message Empty {}
50
+
51
+ service Plugin {
52
+ // GetJobs returns a stream of Job objects.
53
+ // Used to expose jobs to gaia.
54
+ rpc GetJobs (Empty ) returns (stream Job );
55
+
56
+ // ExecuteJob signals the plugin to execute the given job.
57
+ // Used to execute one job from a pipeline.
58
+ rpc ExecuteJob (Job ) returns (JobResult );
59
+ }
You can’t perform that action at this time.
0 commit comments