s3pipe

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultReadBufferSize = 32 * 1024

These values are very conservative defaults.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader s3manager.Downloader

func (Downloader) Download

func (dl Downloader) Download(ctx context.Context, input *s3.GetObjectInput) io.ReadCloser

Download creates a new reader that reads the contents of an S3 object. It uses a downloader to fetch the file in chunks to enable recovery from read errors (e.g., connection resets). It prefetches the next chunk while the previous one is being processed. The chunk size is controlled by dl.PartSize and cost is 2 times dl.PartSize due to double buffer. Making the chunk size large reduces S3 API calls at the expense of memory.

Jump to

Keyboard shortcuts

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