Some checks failed
Build docker and publish / prepare (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
57 lines
1.4 KiB
Protocol Buffer
57 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package core;
|
|
option go_package = "./core";
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// 通用结构
|
|
// ----------------------------------------------------------------------------
|
|
message Empty {}
|
|
|
|
message BasicResponse {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// User 服务定义
|
|
// ----------------------------------------------------------------------------
|
|
message GetUserInfoReq {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message GetUserInfoResp {
|
|
int64 id = 1;
|
|
string email = 2;
|
|
string role = 3;
|
|
string uuid = 4;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// Node 服务定义
|
|
// ----------------------------------------------------------------------------
|
|
message GetNodeInfoReq {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message GetNodeInfoResp {
|
|
int64 id = 1;
|
|
string name = 2;
|
|
string server = 3;
|
|
string status = 4;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// 核心 RPC 服务接口
|
|
// ----------------------------------------------------------------------------
|
|
service Core {
|
|
// Ping 检查服务健康状态
|
|
rpc Ping(Empty) returns(BasicResponse);
|
|
|
|
// 用户相关
|
|
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
|
|
|
|
// 节点相关
|
|
rpc GetNodeInfo(GetNodeInfoReq) returns(GetNodeInfoResp);
|
|
}
|