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
@@ -8,9 +8,9 @@ import (
|
||||
"git.yeij.top/AskaEth/Cyrene_v2/internal/channel/adapter"
|
||||
)
|
||||
|
||||
// TestHub_SendProactive_OwnerAndAdmin verifies a proactive push reaches exactly
|
||||
// the owner/admin connections and returns the delivered count; a viewer or
|
||||
// unauthenticated (nil-claims) connection never receives it.
|
||||
// TestHub_SendProactive_OwnerAndAdmin 验证主动推送恰好抵达
|
||||
// owner/admin 连接并返回投递计数;viewer 或未认证
|
||||
// (nil claims)连接绝不收到它。
|
||||
func TestHub_SendProactive_OwnerAndAdmin(t *testing.T) {
|
||||
t.Parallel()
|
||||
hb := newTestHub(nil, nil)
|
||||
@@ -20,7 +20,7 @@ func TestHub_SendProactive_OwnerAndAdmin(t *testing.T) {
|
||||
admin.claims = &auth.Claims{Role: auth.RoleAdmin}
|
||||
viewer := newFakeConn(hb, 8)
|
||||
viewer.claims = &auth.Claims{Role: auth.RoleViewer}
|
||||
bare := newFakeConn(hb, 8) // claims nil: unauthenticated
|
||||
bare := newFakeConn(hb, 8) // claims 为 nil:未认证
|
||||
for _, c := range []*wsConn{owner, admin, viewer, bare} {
|
||||
hb.register(c)
|
||||
}
|
||||
@@ -69,8 +69,8 @@ func TestHub_SendProactive_OwnerAndAdmin(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestHub_SendProactive_NoOnlineOwner verifies a zero count (no error) when no
|
||||
// owner/admin connection is live, so the caller falls back to the IM bridge.
|
||||
// TestHub_SendProactive_NoOnlineOwner 验证没有存活 owner/admin 连接时
|
||||
// 计数为零(无错误),使调用方回退到 IM bridge。
|
||||
func TestHub_SendProactive_NoOnlineOwner(t *testing.T) {
|
||||
t.Parallel()
|
||||
hb := newTestHub(nil, nil)
|
||||
@@ -87,8 +87,8 @@ func TestHub_SendProactive_NoOnlineOwner(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestHub_SendProactive_CancelledContext verifies a cancelled context denies the
|
||||
// push (fail closed) with a wrapped error.
|
||||
// TestHub_SendProactive_CancelledContext 验证被取消的 context 拒绝该
|
||||
// 推送(fail closed)并返回被 wrap 的错误。
|
||||
func TestHub_SendProactive_CancelledContext(t *testing.T) {
|
||||
t.Parallel()
|
||||
hb := newTestHub(nil, nil)
|
||||
@@ -100,8 +100,8 @@ func TestHub_SendProactive_CancelledContext(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestServer_SendProactive_DelegatesToHub verifies Server.SendProactive mirrors the
|
||||
// hub so the composition root can hand the gateway itself to the sink setter.
|
||||
// TestServer_SendProactive_DelegatesToHub 验证 Server.SendProactive 镜像
|
||||
// hub,使组合根能把网关自身交给汇聚点设置器。
|
||||
func TestServer_SendProactive_DelegatesToHub(t *testing.T) {
|
||||
t.Parallel()
|
||||
env := newEnv(t, nil, false)
|
||||
|
||||
Reference in new issue
Block a user