2020-07-29 18:06:57 +08:00
|
|
|
package internal
|
2020-07-26 17:09:05 +08:00
|
|
|
|
2020-11-11 17:20:56 +08:00
|
|
|
import "google.golang.org/grpc"
|
2020-07-26 17:09:05 +08:00
|
|
|
|
2021-03-01 23:52:44 +08:00
|
|
|
// WithStreamClientInterceptors uses given client stream interceptors.
|
2020-07-26 17:09:05 +08:00
|
|
|
func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption {
|
2020-11-11 17:15:22 +08:00
|
|
|
return grpc.WithChainStreamInterceptor(interceptors...)
|
2020-07-26 17:09:05 +08:00
|
|
|
}
|
|
|
|
|
2021-03-01 23:52:44 +08:00
|
|
|
// WithUnaryClientInterceptors uses given client unary interceptors.
|
2020-07-26 17:09:05 +08:00
|
|
|
func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption {
|
2020-11-11 17:15:22 +08:00
|
|
|
return grpc.WithChainUnaryInterceptor(interceptors...)
|
2020-11-11 17:20:56 +08:00
|
|
|
}
|