MCPcopy Create free account
hub / github.com/compozy/agh / waitForRetry

Method waitForRetry

internal/registry/github/client.go:639–644  ·  view source on GitHub ↗
(ctx context.Context, backoff time.Duration)

Source from the content-addressed store, hash-verified

637}
638
639func (c *Client) waitForRetry(ctx context.Context, backoff time.Duration) (time.Duration, error) {
640 if err := c.sleep(ctx, backoff); err != nil {
641 return 0, fmt.Errorf("github: retry wait aborted: %w", err)
642 }
643 return nextBackoff(backoff, c.maxBackoff), nil
644}
645
646func shouldRetryStatus(statusCode int) bool {
647 return statusCode == http.StatusTooManyRequests || statusCode >= http.StatusInternalServerError

Callers 1

doRequestMethod · 0.95

Calls 1

nextBackoffFunction · 0.70

Tested by

no test coverage detected