// InitGrpcBeforeServing InitGrpcBeforeServing: give the instance of server and listener.
InitGrpcBeforeServing InitGrpcBeforeServing: give the instance of server and listener.
// InitGrpcBeforeServing InitGrpcBeforeServing : give the instance of server and listener .
func InitGrpcBeforeServing(config *config.Config, tracer opentracing.Tracer) (*grpc.Server, net.Listener) {
	listen, err := net.Listen("tcp", config.Grpc.Host+":"+config.Grpc.Port)
	if err != nil {
		logger.Log.Fatal("not able to initialize grpc server", zap.Error(err))
		panic(err)
	}
	var opts []grpc.ServerOption
	opts = middleware.AddInterceptors(logger.Log, tracer, opts)
	server := grpc.NewServer(opts...)
	return server, listen
}
func InitGrpcBeforeServing ( config * config . Config , tracer opentracing . Tracer ) ( * grpc . Server , net . Listener ) { listen , err := net . Listen ( " " , config . Grpc . Host + " " + config . Grpc . Port ) if err != nil { logger . Log . Fatal ( " " , zap . Error ( err ) ) panic ( err ) } var opts [ ] grpc . ServerOption opts = middleware . AddInterceptors ( logger . Log , tracer , opts ) server := grpc . NewServer ( opts ... ) return server , listen }
InitGrpcBeforeServing InitGrpcBeforeServing: give the instance of server and listener.
InitGrpcBeforeServing InitGrpcBeforeServing : give the instance of server and listener .
// gRPC server setup options // add logging middleware // register service