-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfabric.proto
79 lines (59 loc) · 1.98 KB
/
fabric.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.obecto.perper.protobuf";
option csharp_namespace = "Perper.Protocol.Protobuf";
option go_package = "github.com/obecto/perper/scaler/proto";
package perper;
import "google/protobuf/empty.proto";
service Fabric {
rpc Executions (ExecutionsRequest) returns (stream ExecutionsResponse) {}
rpc AllExecutions (ExecutionsRequest) returns (AllExecutionsResponse) {}
rpc ExecutionFinished (ExecutionFinishedRequest) returns (google.protobuf.Empty) {}
rpc ReserveExecution (ReserveExecutionRequest) returns (stream google.protobuf.Empty) {}
rpc ReservedExecutions (stream ReservedExecutionsRequest) returns (stream ExecutionsResponse) {}
rpc StreamItems (StreamItemsRequest) returns (stream StreamItemsResponse) {}
rpc ListenerAttached (ListenerAttachedRequest) returns (google.protobuf.Empty) {}
}
message AllExecutionsResponse {
repeated ExecutionsResponse executions = 1;
}
message ExecutionsRequest {
string agent = 1;
string instance = 2;
string delegate = 3;
bool localToData = 4;
}
message ExecutionsResponse {
//string agent = 1;
// Can possibly remove instance and delegate (99% the agent will be reading the execution data for parameters anyway)
string instance = 2;
string delegate = 3;
string execution = 4;
bool cancelled = 5;
bool startOfStream = 10;
}
message ReservedExecutionsRequest {
uint64 reserveNext = 1;
// Only send with first message:
string workGroup = 5;
ExecutionsRequest filter = 10;
}
message ReserveExecutionRequest {
string execution = 4;
string workGroup = 5;
}
message ExecutionFinishedRequest {
string execution = 4;
}
message StreamItemsRequest {
string stream = 1;
int64 startKey = 2;
bool localToData = 3;
int64 stride = 4; // 0 if realtime, 1.. to wait for stream items
}
message StreamItemsResponse {
int64 key = 1;
}
message ListenerAttachedRequest {
string stream = 1;
}