Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blob: add Bucket.{Upload,Download} APIs #3247

Closed
wants to merge 1 commit into from

Conversation

pgavlin
Copy link

@pgavlin pgavlin commented May 8, 2023

Add Upload and Download methods to blob.Bucket and optional Uploader and Downloader interfaces to driver. If a driver.Bucket implements those interfaces, Upload and Download will call through those interfaces. This allows backends that can implement pull-style uploads and push-style downloads more efficiently than push-style uploads and pull-style downloads to do so.

These changes include an implementation of driver.Uploader for s3blob.Bucket. That implementation allows s3blob.Bucket to avoid allocating temporary buffers if the input is an io.ReaderAt and an io.Seeker. This can dramatically reduce allocation volume for services that upload large amounts of data to S3.

Fixes #3245
Fixes #2807

Add Upload and Download methods to blob.Bucket and optional
Uploader and Downloader interfaces to driver. If a driver.Bucket
implements those interfaces, Upload and Download will call through those
interfaces. This allows backends that can implement pull-style uploads
and push-style downloads more efficiently than push-style uploads and
pull-style downloads to do so.

These changes include an implementation of driver.Uploader for
s3blob.Bucket. That implementation allows s3blob.Bucket to avoid
allocating temporary buffers if the input is an io.ReaderAt and an
io.Seeker. This can dramatically reduce allocation volume for services
that upload large amounts of data to S3.

Fixes google#3245
Fixes google#2807
@vangent
Copy link
Contributor

vangent commented May 9, 2023

See #3248.

@vangent vangent closed this May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants