client

package
v0.0.0-...-c410e1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryable

func IsRetryable(err error) bool

IsRetryable reports whether err should be retried. It returns true when:

  • err satisfies RetryableError and its Retryable method returns true, or
  • err is a googleapi.Error with an HTTP 429 or 5xx status code.

func NewService

func NewService(ctx context.Context, creds *google.Credentials) (*androidpublisher.Service, error)

NewService creates an authenticated androidpublisher.Service using the provided Google credentials. The returned service can be used to interact with the Google Play Developer API v3.

func Retry

func Retry(ctx context.Context, maxRetries int, fn func() error) error

Retry calls fn up to maxRetries times when it returns a retryable error. It uses exponential backoff starting at 1 s and capped at 30 s, with random jitter added to each delay to avoid thundering-herd problems. The context can be used to cancel or time-out the retry loop.

Types

type RetryableError

type RetryableError interface {
	error
	Retryable() bool
}

RetryableError is implemented by errors that can indicate whether a retry is appropriate. Types satisfying this interface allow the retry logic to distinguish transient failures from permanent ones.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL