mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 18:00:24 +08:00
0a2c2d1eca
* change grpc interceptor to chain interceptor * change server rpc interceptors, del testing code
13 lines
367 B
Go
13 lines
367 B
Go
package internal
|
|
|
|
import (
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption {
|
|
return grpc.WithChainStreamInterceptor(interceptors...)
|
|
}
|
|
|
|
func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption {
|
|
return grpc.WithChainUnaryInterceptor(interceptors...)
|
|
} |