Versions in this module Expand all Collapse all v0 v0.0.1 Nov 28, 2024 Changes in this version + const DefaultDownloadConcurrency + const DefaultDownloadPartSize + const DefaultPartBodyMaxRetries + func DefaultHttpRequestFunc(ctx context.Context, params *HttpRequestParams) (*http.Response, error) + func GetRangedHttpReader(readCloser io.ReadCloser, offset, length int64) (io.ReadCloser, error) + func HttpClient() *http.Client + func ProcessHeader(origin, override http.Header) http.Header + func RequestHttp(ctx context.Context, httpMethod string, headerOverride http.Header, URL string) (*http.Response, error) + func ServeHTTP(w http.ResponseWriter, r *http.Request, name string, modTime time.Time, ...) + type Buf struct + func NewBuf(ctx context.Context, maxSize int, id int) *Buf + func (br *Buf) Close() + func (br *Buf) Read(p []byte) (n int, err error) + func (br *Buf) Reset(size int) + func (br *Buf) Write(p []byte) (n int, err error) + type Downloader struct + Concurrency int + HttpClient HttpRequestFunc + PartBodyMaxRetries int + PartSize int + func NewDownloader(options ...func(*Downloader)) *Downloader + func (d Downloader) Download(ctx context.Context, p *HttpRequestParams) (readCloser io.ReadCloser, err error) + type HttpRequestFunc func(ctx context.Context, params *HttpRequestParams) (*http.Response, error) + type HttpRequestParams struct + HeaderRef http.Header + Range http_range.Range + Size int64 + URL string + type LimitedReadCloser struct + func (l *LimitedReadCloser) Close() error + func (l *LimitedReadCloser) Read(buf []byte) (int, error) + type MultiReadCloser struct + func NewMultiReadCloser(buf *Buf, c closerFunc, fb finishBufFUnc) *MultiReadCloser + func (mr MultiReadCloser) Close() error + func (mr MultiReadCloser) Read(p []byte) (n int, err error)