zeroshade commented on a change in pull request #10633:
URL: https://github.com/apache/arrow/pull/10633#discussion_r664767850



##########
File path: go/arrow/flight/server.go
##########
@@ -63,6 +104,8 @@ type server struct {
 // Alternatively, a grpc server can be created normally without this helper as 
the
 // grpc server generated code is still being exported. This only exists to 
allow
 // the utility of the helpers
+//
+// Deprecated: prefer to use NewServerWithMiddleware

Review comment:
       There's a couple reasons:
   
   The `NewServer` function can actually cause problems if using an auth 
handler + passing in grpc options that set interceptors because of how it was 
handled, whereas using this given the definition of the middlewares makes it 
explicit that interceptors should be set using the middleware rather than using 
the generic grpc options.
   
   In addition, by marking this deprecated, we can eventually remove this old 
function and make `NewServerWithMiddleware` the actual `NewServer` function so 
everything is very explicit.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to