docs(gateway): gateway 剩余文件注释改中文(逐行 1:1,代码零字节改动)
主人 2026-10-03 拍板「注释一律中文」;gateway 至此整包注释中文化完成(本会话共 3 批: 已推库 16 个文件 + 本批剩余文件)。 校验:机械校验(非注释改动行)= 空;剥注释后代码文本逐行比对全等(不一致文件数 0); 全树 go test ./... 58 包 ok / 0 FAIL;交叉编译绿。
This commit is contained in:
1 parent
91e8d7a029
commit
074ffc4ebf
73 files changed
+2529
-2529
No files matched your search
@@ -19,9 +19,9 @@ import (
|
||||
"git.yeij.top/AskaEth/Cyrene_v2/internal/config/runtimeconfig"
|
||||
)
|
||||
|
||||
// fakeMCPHandler is a minimal Streamable HTTP MCP server for the plugin tests.
|
||||
// wantAuth, when set, requires the bearer header; tools is mutated atomically so
|
||||
// a refresh test can change the tool list.
|
||||
// fakeMCPHandler 是供插件测试用的最小 Streamable HTTP MCP server。
|
||||
// wantAuth 设置后要求 bearer 头;tools 以原子方式变更,
|
||||
// 使刷新测试能改变工具列表。
|
||||
type fakeMCPHandler struct {
|
||||
wantAuth string
|
||||
tools []string
|
||||
@@ -69,8 +69,8 @@ func (f *fakeMCPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write(resp)
|
||||
}
|
||||
|
||||
// pluginTestEnv is a gateway wired with a real plugin manager over a temp
|
||||
// plugins.json.
|
||||
// pluginTestEnv 是一个网关,接线了以临时 plugins.json 为
|
||||
// 后端的真实插件管理器。
|
||||
type pluginTestEnv struct {
|
||||
ts *httptest.Server
|
||||
caps *capreg.Registry
|
||||
@@ -108,7 +108,7 @@ func newPluginTestEnv(t *testing.T, mcp *fakeMCPHandler) *pluginTestEnv {
|
||||
return &pluginTestEnv{ts: ts, caps: caps, path: path, token: tok, mcpURL: mcpURL}
|
||||
}
|
||||
|
||||
// newFakeMCPHandler returns a fake server plus a setter for its tool list.
|
||||
// newFakeMCPHandler 返回一个假 server 以及其工具列表的 setter。
|
||||
func newFakeMCPHandler(wantAuth string, tools ...string) *fakeMCPHandler {
|
||||
return &fakeMCPHandler{wantAuth: wantAuth, tools: tools}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user