MCPcopy
hub / github.com/grpc/grpc-go / withBackoff

Function withBackoff

dialoptions.go:355–359  ·  view source on GitHub ↗

withBackoff sets the backoff strategy used for connectRetryNum after a failed connection attempt. This can be exported if arbitrary backoff strategies are allowed by gRPC.

(bs internalbackoff.Strategy)

Source from the content-addressed store, hash-verified

353//
354// This can be exported if arbitrary backoff strategies are allowed by gRPC.
355func withBackoff(bs internalbackoff.Strategy) DialOption {
356 return newFuncDialOption(func(o *dialOptions) {
357 o.bs = bs
358 })
359}
360
361// WithBlock returns a DialOption which makes callers of Dial block until the
362// underlying connection is up. Without this, Dial returns immediately and

Callers 2

WithBackoffConfigFunction · 0.85

Calls 1

newFuncDialOptionFunction · 0.85

Tested by 1