github.com/lingyao2333/mo-zero@v1.4.1/zrpc/internal/chainserverinterceptors.go (about) 1 package internal 2 3 import "google.golang.org/grpc" 4 5 // WithStreamServerInterceptors uses given server stream interceptors. 6 func WithStreamServerInterceptors(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption { 7 return grpc.ChainStreamInterceptor(interceptors...) 8 } 9 10 // WithUnaryServerInterceptors uses given server unary interceptors. 11 func WithUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption { 12 return grpc.ChainUnaryInterceptor(interceptors...) 13 }