feat 结构调整

This commit is contained in:
2025-12-20 15:39:25 +08:00
parent 55c5d4cc18
commit ff1bd1d0b6
96 changed files with 4904 additions and 350 deletions

View File

@@ -7,7 +7,9 @@ import (
"context"
"fmt"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/status"
"net"
"sync"
"time"
@@ -51,6 +53,7 @@ func (s *Base) Init(addr string, port int32) {
defer func() {
if r := recover(); r != nil {
log.Errorf("server Panic: %v", r)
err = status.Error(codes.Internal, fmt.Sprintf("%v", r))
}
}()
resp, err = handler(ctx, req)