package servesr import ( "fmt" "git.icechen.cn/monorepo/backend/pkg/proto/brahma/murders" "git.icechen.cn/monorepo/backend/pkg/rpc" ctxLogger "github.com/luizsuper/ctxLoggers" "go.uber.org/zap" "google.golang.org/grpc" "net" ) func RpcServer() { lis, err := net.Listen("tcp", ":3100") if err != nil { ctxLogger.Info(nil, "brahma server start up error", zap.String("error", err.Error())) } s := grpc.NewServer(grpc.UnaryInterceptor(rpc.Interceptor)) murders.RegisterMurdersServer(s, &Script{}) fmt.Println("lark server run in :3000") if err := s.Serve(lis); err != nil { ctxLogger.Info(nil, "brahma server start up error", zap.String("error", err.Error())) } }