MCPcopy Create free account
hub / github.com/cloud-native-go/examples / withNoBackoff

Function withNoBackoff

ch09/backoff-simulator/main.go:94–101  ·  view source on GitHub ↗

Using withNoBackoff as the backoff function sends retries as quickly as possible, with no backoff of any kind.

()

Source from the content-addressed store, hash-verified

92// Using withNoBackoff as the backoff function sends retries as quickly as
93// possible, with no backoff of any kind.
94func withNoBackoff() string {
95 res, err := sendRequest()
96 for err != nil {
97 res, err = sendRequest()
98 }
99
100 return res
101}
102
103// Using withDelayedBackoff as the backoff function sends retries after a
104// two-second delay.

Callers

nothing calls this directly

Calls 1

sendRequestFunction · 0.85

Tested by

no test coverage detected