api/proto/task.proto

42 lines
945 B
Protocol Buffer
Raw Permalink Normal View History

2025-10-01 19:32:27 +03:00
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;
2025-10-03 19:14:13 +03:00
int32 price = 3;
2025-10-01 19:32:27 +03:00
}
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);
2025-10-03 19:14:13 +03:00
}