refactor api server around rpc services

This commit is contained in:
lpf
2026-03-15 01:00:41 +08:00
parent 341e578c9f
commit 231529e907
32 changed files with 5956 additions and 3614 deletions

View File

@@ -18,15 +18,6 @@ func truncateString(s string, maxLen int) string {
return s[:maxLen]
}
func safeCloseSignal(v interface{}) {
ch, ok := v.(chan struct{})
if !ok || ch == nil {
return
}
defer func() { _ = recover() }()
close(ch)
}
type cancelGuard struct {
mu sync.Mutex
cancel context.CancelFunc