完成预测模型的grpc服务

This commit is contained in:
2021-03-25 17:36:09 +08:00
parent 36b30982f7
commit bb90138620
14 changed files with 553 additions and 47 deletions

39
api/predict.proto Normal file
View File

@@ -0,0 +1,39 @@
syntax = "proto3";
service Predict {
rpc PayDay(RequestPay) returns (ReplyPay) {}
rpc GiftDay(RequestGift) returns (ReplyGift) {}
}
// Request 统一Request请求
message RequestPay {
// count, total_coin / last_total_coin, total_coin // 24小时
int32 Hour = 1;
int64 Coin = 2;
int64 YesterdayCoin = 3;
}
// RequestGift 统一Request请求
message RequestGift {
// count, total_coin / last_total_coin, total_coin // 24小时
int32 Hour = 1;
int64 Coin = 2;
int64 YesterdayCoin = 3;
}
// ReplyHeader 统一ReplyHeader 响应
message ReplyHeader {
int32 Code = 1;
string Message = 2;
}
message ReplyPay {
ReplyHeader Header = 1;
int64 Result = 2;
}
message ReplyGift {
ReplyHeader Header = 1;
int64 Result = 2;
}