-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplugin.proto
59 lines (49 loc) · 1.55 KB
/
plugin.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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);
}