basic app
This commit is contained in:
parent
0a6e246a5c
commit
8d6c2b6687
30 changed files with 1469 additions and 0 deletions
41
proto/task.proto
Normal file
41
proto/task.proto
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
syntax = "proto3";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
package taskProcessor;
|
||||
option go_package = "./taskProcessor";
|
||||
|
||||
|
||||
message Task{
|
||||
string merch_uuid = 1;
|
||||
string origin_surugaya_link = 2;
|
||||
string origin_mandarake_link = 3;
|
||||
}
|
||||
|
||||
message Result{
|
||||
string merch_uuid = 1;
|
||||
string origin_name = 2;
|
||||
uint32 price = 3;
|
||||
}
|
||||
|
||||
message ProcessorStatusRequest{}
|
||||
|
||||
message ProcessorStatusResponse {
|
||||
int64 appStart = 1;
|
||||
int64 lastCheck = 2;
|
||||
int32 tasksReceived = 3;
|
||||
int32 tasksInProgress = 4;
|
||||
int32 tasksFirstTry = 5;
|
||||
int32 tasksDoneAfterRetry = 6;
|
||||
int32 tasksFailed = 7;
|
||||
string workStatus = 8;
|
||||
int32 numCPUs = 9;
|
||||
int32 checkPeriod = 10;
|
||||
int32 retriesCount = 11;
|
||||
int32 retriesMinutes = 12;
|
||||
}
|
||||
|
||||
service TaskProcessor {
|
||||
rpc RequestTask(google.protobuf.Empty) returns (stream Task);
|
||||
rpc SendResult(stream Result) returns (google.protobuf.Empty);
|
||||
rpc ProcessorStatus(ProcessorStatusRequest) returns (ProcessorStatusResponse);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue