internal

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusCodeRetryOther  = http.StatusPermanentRedirect
	StatusCodeThrottle    = http.StatusTooManyRequests
	StatusCodeUnavailable = http.StatusServiceUnavailable
)

Variables

This section is empty.

Functions

func DrainBody

func DrainBody(resp *http.Response)

DrainBody reads then closes a response's body if it is non-nil. This function should be deferred before a response reference is discarded.

func IsRetryOtherResponse

func IsRetryOtherResponse(resp *http.Response) (bool, *url.URL)

func IsThrottleResponse

func IsThrottleResponse(resp *http.Response) (bool, time.Duration)

func IsUnavailableResponse

func IsUnavailableResponse(resp *http.Response) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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