forked from wonderlandcompute/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wonderland.proto
45 lines (36 loc) · 911 Bytes
/
wonderland.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
syntax = "proto3";
message Job {
string project = 1;
uint64 id = 2;
string kind = 3;
enum Status {
PENDING = 0;
PULLED = 1;
RUNNING = 2;
FAILED = 3;
COMPLETED = 4;
}
Status status = 4;
string input = 5;
string output = 6;
string metadata = 7;
}
message ListOfJobs {
repeated Job jobs = 1;
}
message RequestWithId {
uint64 id = 1;
}
message ListJobsRequest {
uint32 how_many = 1;
string project = 2;
string kind = 3;
}
service Wonderland {
rpc CreateJob (Job) returns (Job) {}
rpc GetJob (RequestWithId) returns (Job) {}
rpc ListJobs (ListJobsRequest) returns (ListOfJobs) {}
rpc ModifyJob (Job) returns (Job) {} /** Merges passed Status, MetricValue and Metadata to db */
rpc PullPendingJobs (ListJobsRequest) returns (ListOfJobs) {}
rpc DeleteJob(RequestWithId) returns (Job) {}
}