chainserverinterceptors.go 499 B

12345678910111213
  1. package internal
  2. import "google.golang.org/grpc"
  3. // WithStreamServerInterceptors uses given server stream interceptors.
  4. func WithStreamServerInterceptors(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption {
  5. return grpc.ChainStreamInterceptor(interceptors...)
  6. }
  7. // WithUnaryServerInterceptors uses given server unary interceptors.
  8. func WithUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption {
  9. return grpc.ChainUnaryInterceptor(interceptors...)
  10. }