Versions in this module Expand all Collapse all v1 v1.0.3 Jan 24, 2020 Changes in this version type HTTPRanger + UserAgent string v1.0.0 Sep 28, 2019 Changes in this version + const DefaultBlockSize + var ErrResourceChanged = errors.New("unsatisfiable range request; resource may have changed") + var ErrResourceNotFound = errors.New("resource not found") + type Block struct + Data []byte + Length int64 + type ByteRange struct + End int64 + Start int64 + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + Get func(string) (*http.Response, error) + Head func(string) (*http.Response, error) + type HTTPRanger struct + Client HTTPClient + DisableAcceptRangesHeaderCheck bool + URL *url.URL + func (r *HTTPRanger) ExpectedLength() (int64, error) + func (r *HTTPRanger) FetchRanges(ranges []ByteRange) ([]Block, error) + type RangeFetcher interface + ExpectedLength func() (int64, error) + FetchRanges func([]ByteRange) ([]Block, error) + type Reader struct + BlockSize int + Fetcher RangeFetcher + func NewReader(fetcher RangeFetcher) (*Reader, error) + func (r *Reader) Length() (int64, error) + func (r *Reader) Read(p []byte) (int, error) + func (r *Reader) ReadAt(p []byte, off int64) (int, error) + func (r *Reader) Seek(off int64, whence int) (int64, error)