level2producer.proto 4.29 KB
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
syntax = "proto3";

package dfs.facility.level2producer;
option go_package = "cnlab.net/csst/proto/facility/level2producer";
import "common/error.proto";

service Level2ProducerSrv {
        rpc Register(RegisterReq) returns (RegisterResp) {}
        rpc Find(FindReq) returns (FindResp) {}
        rpc FindNexts(FindNextsReq) returns (FindNextsResp) {}
        rpc FindStart(FindStartReq) returns (FindStartResp) {}
        rpc Get(GetReq) returns (GetResp) {}
        rpc Update(UpdateReq) returns (UpdateResp) {}
        rpc Delete(DeleteReq) returns (DeleteResp) {}

        rpc NewJob(NewJobReq) returns (NewJobResp) {}
        rpc GetJob(GetJobReq) returns (GetJobResp) {}
        rpc UpdateJob(UpdateJobReq) returns (UpdateJobResp) {}

        rpc WriteRunning(WriteRunningReq) returns (WriteRunningResp) {}
        rpc GetRunning(GetRunningReq) returns (GetRunningResp) {}
        rpc UpdateRunning(UpdateRunningReq) returns (UpdateRunningResp) {}
        rpc FindRunning(FindRunningReq) returns (FindRunningResp) {}
}
message Level2ProducerRecord {
        int64 id = 1;
        string name = 2;
        string gitlink = 3;
        string paramfiles = 4;
        string image = 5;
        int32 priority = 6;
        repeated int64 pre_producers = 7;
        string create_time = 8;
        string update_time = 9;
}
message Level2JobRecord {
        int64 id = 1;
        string name = 2;
        string dag = 3;
        int32 status = 4;
        string create_time = 5;
        string update_time = 6;        
}
message Level2ProducerRuningRecord {
        int64 id = 1;
        int64 job_id = 2;
        int64 producer_id = 3;
        int64 brick_id = 4;
        string start_time = 5;
        string end_time = 6;
        int32 prc_status = 7;
        string prc_result = 8;
        string create_time = 9;
        string update_time = 10;
}
message RegisterReq {
        Level2ProducerRecord record = 1;
}
message RegisterResp {
        bool success = 1;
        common.Error error = 2;
        Level2ProducerRecord record = 3;
}
message FindReq {
        string key = 1;
        int32 limit = 2;
}
message FindResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated Level2ProducerRecord records = 4;
}
message FindStartReq {
        string key = 1;
}
message FindStartResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated Level2ProducerRecord records = 4;
}
message FindNextsReq {
        int64 id = 1;
}
message FindNextsResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated Level2ProducerRecord records = 4;
}
message GetReq {
        int64 id = 1;
}
message GetResp {
        Level2ProducerRecord record = 1;
}
message UpdateReq {
        Level2ProducerRecord record = 1;
}
message UpdateResp {
        bool success = 1;
        common.Error error = 2;
}
message DeleteReq {
        int64 id = 1;
}
message DeleteResp {
        bool success = 1;
        common.Error error = 2;
}
message NewJobReq {
        Level2JobRecord record = 1;
}
message NewJobResp {
        bool success = 1;
        common.Error error = 2;
        Level2JobRecord record = 3;
}
message GetJobReq {
        int64 id = 1;
}
message GetJobResp {
        Level2JobRecord record = 1;
}
message UpdateJobReq {
        Level2JobRecord record = 1;
}
message UpdateJobResp {
        bool success = 1;
        common.Error error = 2;
}
message WriteRunningReq {
        Level2ProducerRuningRecord record = 1;
}
message WriteRunningResp {
        bool success = 1;
        common.Error error = 2;
        Level2ProducerRuningRecord record = 3;
}
message GetRunningReq {
        int64 id = 1;
}
message GetRunningResp {
        Level2ProducerRuningRecord record = 1;
}
message UpdateRunningReq {
        Level2ProducerRuningRecord record = 1;
}
message UpdateRunningResp {
        bool success = 1;
        common.Error error = 2;
}
message FindRunningReq {
        int64 job_id = 1;
        int64 producer_id = 2;
        int64 brick_id = 3;
        int32 prc_status = 4;
        string start_time = 5;
        string end_time = 6;
        int32 limit = 7;
}
message FindRunningResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated Level2ProducerRuningRecord records = 4;
}