chore(vscode): 更新调试配置并删除无用的 API 代码

- 在 .vscode/launch.json 中添加了新的 Go 调试配置项
- 删除了 blazing/common/api 目录下未使用的 Kick.pb.go 和 Quit.pb.go 文件
This commit is contained in:
2025-07-06 19:31:30 +08:00
parent 83ecb90baf
commit 53da82df82
17 changed files with 279 additions and 1453 deletions

View File

@@ -1,71 +0,0 @@
syntax = "proto3";
// 指定 Go 包路径(推荐使用完整的模块路径)
option go_package = "/common/api";
package api;
// 注册请求 - logic 用户登录后注册
message RegisterUser {
int32 identity = 1; // 客户端身份,进入后保存id->端口 实现通知踢人以及进程退出
int32 user_id = 2; // 执行踢人操作的用户id
}
// 注册请求 - B客户端使用此消息向服务器注册
message KickRequest {
int32 user_id = 1; // 执行踢人操作的用户id
}
// 函数描述符
message FunctionDescriptor {
string function_name = 1; // 函数名称
string input_type = 2; // 输入参数类型
string output_type = 3; // 输出参数类型
string description = 4; // 函数描述
}
// 注册响应
message RegisterResponse {
bool success = 1; // 注册是否成功
string message = 2; // 消息描述
string registration_id = 3; // 注册ID
}
// 函数调用请求 - A客户端使用此消息请求调用B的函数
message FunctionCallRequest {
string target_client_id = 1; // 目标客户端IDB
string function_name = 2; // 要调用的函数名
bytes parameters = 3; // 序列化后的函数参数
string call_id = 4; // 调用ID用于关联响应
}
// 函数调用响应 - 从B客户端返回给A客户端
message FunctionCallResponse {
string call_id = 1; // 对应请求的调用ID
bool success = 2; // 调用是否成功
bytes result = 3; // 序列化后的返回结果
string error_message = 4; // 错误消息(如果失败)
}
// 通用消息
message GenericMessage {
oneof payload {
RegisterUser register_request = 1;
RegisterResponse register_response = 2;
FunctionCallRequest function_call_request = 3;
FunctionCallResponse function_call_response = 4;
string text_message = 5; // 普通文本消息
KickRequest kick_response = 6;
bool sucess = 7;
}
}
// 主服务接口
service BothWayStreamServer {
// 双向流连接 - 用于注册和函数调用
rpc Call (stream GenericMessage) returns (stream GenericMessage);
// 函数调用服务 - A客户端通过此方法请求调用B的函数
//rpc CallFunction (FunctionCallRequest) returns (FunctionCallResponse);
}