Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMaxRetries = 30
DefaultMaxRetries is the default number of maximum retries before the HttpRange will give up with ErrTooManyRetries.
Variables ¶
View Source
var ErrTooManyRetries = errors.New("Too many retries")
Error returned when the number of retries has been reached.
Functions ¶
This section is empty.
Types ¶
type ErrBadResponseCode ¶
type ErrBadResponseCode int
ErrBadResponseCode is an error returned if the response code is non 200 to 299.
func (ErrBadResponseCode) Error ¶
func (e ErrBadResponseCode) Error() string
type HTTPRange ¶
type HTTPRange struct {
// contains filtered or unexported fields
}
HTTPRange manages the configuration for fetching a range.
func (*HTTPRange) WithWriteObserver ¶
func (httpRange *HTTPRange) WithWriteObserver(observer func(writtenSoFar int64, totalExpectedSize int64)) *HTTPRange
Sets the write observer for this HTTP Range. This returns the original range.
func (*HTTPRange) WriteTo ¶
WriteTo will execute the request and write the response to the writer. This will check that the entire response was returned, as determined by the Content-Length of the first request, and will retry the request from the stopping point until the response has been returned.
Click to show internal directories.
Click to hide internal directories.