Skip to content

Commit

Permalink
feat: Create grpc.go
Browse files Browse the repository at this point in the history
  • Loading branch information
qloog authored Aug 1, 2024
1 parent efe370d commit 2ba53dc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions internal/server/grpc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package server

import (
"github.com/go-eagle/eagle/pkg/app"
"github.com/go-eagle/eagle/pkg/transport/grpc"
)

// NewGRPCServer creates a gRPC server
func NewGRPCServer(cfg *app.Config) *grpc.Server {
grpcServer := grpc.NewServer(
grpc.Network("tcp"),
grpc.Address(cfg.GRPC.Addr),
grpc.Timeout(cfg.GRPC.ReadTimeout),
)

// register biz service
// v1.RegisterUserServiceServer(grpcServer, service.Svc.Users())

return grpcServer
}

0 comments on commit 2ba53dc

Please sign in to comment.