Versions in this module Expand all Collapse all v0 v0.33.19 Sep 16, 2026 Changes in this version + const DefaultIdleReadTimeout + const SourceHashTimeoutCeiling + var ErrContentRangeMismatch = errors.New("server Content-Range does not match requested range") + var ErrDataPlaneIdle = errors.New("data-plane read stalled: no bytes within idle timeout") + var ErrDataPlaneNotAccepted = errors.New("data-plane endpoint did not accept the request") + var ErrExportUnauthorized = errors.New("data exporter rejected the request as unauthorized") + var ErrRangeIgnored = errors.New("server ignored the Range header and returned the whole object") + func BlockURL(baseURL string) (string, error) + func FilesURL(baseURL string) (string, error) + func IsFatalDataPlaneError(err error) bool + func IsTransientDataPlaneError(err error) bool + type Attempt func(ctx context.Context) (Progress, error) + type Doer interface + Do func(req *http.Request) (*http.Response, error) + type DoerFunc func(req *http.Request) (*http.Response, error) + func (d DoerFunc) Do(req *http.Request) (*http.Response, error) + type Fetcher struct + func NewFetcher(doer Doer, opts ...FetcherOption) *Fetcher + func (f *Fetcher) GetFile(ctx context.Context, fileURL string) (io.ReadCloser, error) + func (f *Fetcher) HeadVolume(ctx context.Context, blockURL string) (int64, error) + func (f *Fetcher) ListDir(ctx context.Context, filesURL string, yield func(Item) error) error + func (f *Fetcher) OpenStream(ctx context.Context, rawURL string, from int64) (io.ReadCloser, int64, error) + func (f *Fetcher) RangeGet(ctx context.Context, blockURL string, start, end int64) (io.ReadCloser, error) + func (f *Fetcher) SourceMD5(ctx context.Context, fileURL string, size int64) (string, error) + type FetcherOption func(*Fetcher) + func WithIdleReadTimeout(d time.Duration) FetcherOption + func WithPublishUnauthorizedHint() FetcherOption + func WithSourceHashDoer(doer Doer) FetcherOption + type Item struct + Attributes map[string]any + Name string + TargetPath string + Type string + URI string + type Progress struct + Durable int64 + Start int64 + func (p Progress) Delivered() int64 + type Retrier struct + func NewRetrier(policy RetryPolicy) *Retrier + func (r *Retrier) Recovered() int64 + func (r *Retrier) Resume(ctx context.Context, log *slog.Logger, subject string, attempt Attempt) error + type RetryPolicy struct + Backoff wait.Backoff + Fatal func(error) bool + MaxNoProgress int + func DefaultRetryPolicy() RetryPolicy