aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/googleapis/gax-go/call_option.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/googleapis/gax-go/call_option.go')
-rw-r--r--vendor/github.com/googleapis/gax-go/call_option.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/googleapis/gax-go/call_option.go b/vendor/github.com/googleapis/gax-go/call_option.go
index 4ba1cdf..536cb8c 100644
--- a/vendor/github.com/googleapis/gax-go/call_option.go
+++ b/vendor/github.com/googleapis/gax-go/call_option.go
@@ -129,8 +129,21 @@ func (bo *Backoff) Pause() time.Duration {
return d
}
+type grpcOpt []grpc.CallOption
+
+func (o grpcOpt) Resolve(s *CallSettings) {
+ s.GRPC = o
+}
+
+func WithGRPCOptions(opt ...grpc.CallOption) CallOption {
+ return grpcOpt(append([]grpc.CallOption(nil), opt...))
+}
+
type CallSettings struct {
// Retry returns a Retryer to be used to control retry logic of a method call.
// If Retry is nil or the returned Retryer is nil, the call will not be retried.
Retry func() Retryer
+
+ // CallOptions to be forwarded to GRPC.
+ GRPC []grpc.CallOption
}