@@ -38,15 +38,15 @@ const (
3838// The default configuration of the interceptor is to not retry *at all*. This behaviour can be
3939// changed through options (e.g. WithMax) on creation of the interceptor or on call (through grpc.CallOptions).
4040func UnaryClientInterceptor (logger log.Logger , optFuncs ... CallOption ) grpc.UnaryClientInterceptor {
41- intOpts := reuseOrNewWithCallOptions (defaultOptions , optFuncs )
41+ intOpts := newWithCallOptions (defaultOptions , optFuncs )
4242 return func (parentCtx context.Context , fullMethod string , req , reply any , cc * grpc.ClientConn , invoker grpc.UnaryInvoker , opts ... grpc.CallOption ) error {
4343 tr := trace .FromContext (parentCtx )
4444 tr .SetAttributes (attribute .Bool (retriedTraceAttributeKey , false ))
4545
4646 service , method := grpcutil .SplitMethodName (fullMethod )
4747
4848 grpcOpts , retryOpts := filterCallOptions (opts )
49- callOpts := reuseOrNewWithCallOptions (intOpts , retryOpts )
49+ callOpts := newWithCallOptions (intOpts , retryOpts )
5050
5151 doTrace := makeTracingCallback (parentCtx , logger , service , method )
5252 originalCallback := callOpts .onRetryCallback
@@ -104,15 +104,15 @@ func UnaryClientInterceptor(logger log.Logger, optFuncs ...CallOption) grpc.Unar
104104// to buffer the messages sent by the client. If retry is enabled on any other streams (ClientStreams,
105105// BidiStreams), the retry interceptor will fail the call.
106106func StreamClientInterceptor (logger log.Logger , optFuncs ... CallOption ) grpc.StreamClientInterceptor {
107- intOpts := reuseOrNewWithCallOptions (defaultOptions , optFuncs )
107+ intOpts := newWithCallOptions (defaultOptions , optFuncs )
108108 return func (parentCtx context.Context , desc * grpc.StreamDesc , cc * grpc.ClientConn , fullMethod string , streamer grpc.Streamer , opts ... grpc.CallOption ) (grpc.ClientStream , error ) {
109109 tr := trace .FromContext (parentCtx )
110110 tr .SetAttributes (attribute .Bool (retriedTraceAttributeKey , false ))
111111
112112 service , method := grpcutil .SplitMethodName (fullMethod )
113113
114114 grpcOpts , retryOpts := filterCallOptions (opts )
115- callOpts := reuseOrNewWithCallOptions (intOpts , retryOpts )
115+ callOpts := newWithCallOptions (intOpts , retryOpts )
116116 // short circuit for simplicity, and avoiding allocations.
117117
118118 doTrace := makeTracingCallback (parentCtx , logger , service , method )
0 commit comments