41 lines
No EOL
945 B
Protocol Buffer
41 lines
No EOL
945 B
Protocol Buffer
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);
|
|
} |