forked from UBAutograding/leviathan
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjobs.proto
More file actions
53 lines (39 loc) · 1.07 KB
/
jobs.proto
File metadata and controls
53 lines (39 loc) · 1.07 KB
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
syntax = "proto3";
package jobs.v1;
option go_package = "github.com/makeopensource/leviathan/generated/jobs/v1";
import "types/v1/types.proto";
service JobService {
rpc NewJob(NewJobRequest) returns (NewJobResponse) {}
// Gets job status at call time, whatever it may be
rpc GetStatus (JobLogRequest) returns (JobLogsResponse) {}
// Streams job status until it is complete
rpc StreamStatus(JobLogRequest) returns (stream JobLogsResponse) {}
rpc CancelJob(CancelJobRequest) returns (CancelJobResponse) {}
}
message NewJobRequest {
repeated types.v1.FileUpload jobFiles = 1;
types.v1.FileUpload dockerFile = 2;
string imageName = 3;
uint64 jobTimeoutInSeconds = 4;
string entryCmd = 5;
types.v1.MachineLimits limits = 6;
}
message NewJobResponse {
string jobId = 1;
}
message CancelJobRequest {
string jobId = 1;
}
message CancelJobResponse {}
message JobLogRequest {
string jobId = 1;
}
message JobLogsResponse {
JobStatus jobInfo = 1;
string logs = 2;
}
message JobStatus {
string job_id = 1;
string status = 2;
string status_message = 3;
}