完成预测模型的grpc服务
This commit is contained in:
39
api/predict.proto
Normal file
39
api/predict.proto
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user