go-zero/zrpc/internal/chainclientinterceptors.go

12 lines
363 B
Go
Raw Normal View History

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
func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption {
return grpc.WithChainStreamInterceptor(interceptors...)
2020-07-26 17:09:05 +08:00
}
func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption {
return grpc.WithChainUnaryInterceptor(interceptors...)
2020-11-11 17:20:56 +08:00
}