Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RetryingStreamClientInterceptor ¶
func RetryingStreamClientInterceptor(callOpts ...CallOption) func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
RetryingStreamClientInterceptor returns a ClientStreamInterceptor that retries both requests and responses
func RetryingUnaryClientInterceptor ¶
func RetryingUnaryClientInterceptor(callOpts ...CallOption) func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
RetryingUnaryClientInterceptor returns a UnaryClientInterceptor that retries requests
Types ¶
type CallOption ¶
type CallOption struct { grpc.EmptyCallOption // make sure we implement private after() and before() fields so we don't panic. // contains filtered or unexported fields }
CallOption is a retrying interceptor call option
func WithInterval ¶
func WithInterval(d time.Duration) CallOption
WithInterval sets the base retry interval
func WithMaxInterval ¶
func WithMaxInterval(d time.Duration) CallOption
WithMaxInterval sets the maximum retry interval
func WithPerCallTimeout ¶
func WithPerCallTimeout(t time.Duration) CallOption
WithPerCallTimeout sets the per-call retry timeout
func WithRetryOn ¶
func WithRetryOn(codes ...codes.Code) CallOption
WithRetryOn sets the codes on which to retry a request
Click to show internal directories.
Click to hide internal directories.