Skip to content

[WIP] Storagedriver: GCS: Add new StorageDriver.FileWriter implementation - #1

Merged
BrianBland merged 3 commits into
BrianBland:newStorageDriverWriterfrom
aibaars:newStorageDriverWriter-gcs
Feb 23, 2016
Merged

BrianBland merged 3 commits into
BrianBland:newStorageDriverWriterfrom
aibaars:newStorageDriverWriter-gcs

Conversation

@aibaars

@aibaars aibaars commented Feb 12, 2016

Copy link
Copy Markdown

This PR is an attempt to implement the new StorageDriver.FileWriter interface (distribution#1438) for the Google Cloud Storage driver.

The implementation of FileWriter.Size for GCS returns the number of bytes that have been successfully persisted to cloud storage. I had to change the testsuite a little to make sure that the FileWriter is closed before calling Size.

@BrianBland

@aibaars
aibaars force-pushed the newStorageDriverWriter-gcs branch from 8e5393b to b9edd95 Compare February 12, 2016 18:07
@aibaars

aibaars commented Feb 12, 2016

Copy link
Copy Markdown
Author

@BrianBland It was very easy to implement the new interface. All I had to do was copy the relevant bits and pieces from distribution#1322 into the right places.

@aibaars
aibaars force-pushed the newStorageDriverWriter-gcs branch from b9edd95 to 5147acb Compare February 12, 2016 18:39
@BrianBland
BrianBland force-pushed the newStorageDriverWriter branch 3 times, most recently from 769c375 to a0d049a Compare February 13, 2016 00:01
@aibaars
aibaars force-pushed the newStorageDriverWriter-gcs branch 4 times, most recently from 82d9b7c to 8d5b64d Compare February 15, 2016 12:34
@BrianBland
BrianBland force-pushed the newStorageDriverWriter branch 5 times, most recently from 1f3d6e2 to 309ef74 Compare February 16, 2016 23:13
Comment thread registry/storage/driver/gcs/gcs.go Outdated
// Stat retrieves the FileInfo for the given path, including the current
// size in bytes and the creation time.
func (d *driver) Stat(context ctx.Context, path string) (storagedriver.FileInfo, error) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could you remove this empty line?

@BrianBland

Copy link
Copy Markdown
Owner

Generally looks pretty good, but needs a rebase. I'll ping you when the base commit is ready.

@aibaars
aibaars force-pushed the newStorageDriverWriter-gcs branch 2 times, most recently from ef9cb85 to afbe3a2 Compare February 18, 2016 12:05
@aibaars
aibaars force-pushed the newStorageDriverWriter-gcs branch from afbe3a2 to e50e15b Compare February 18, 2016 12:13
@aibaars

aibaars commented Feb 18, 2016

Copy link
Copy Markdown
Author

Rebased, and removed the empty line.

@BrianBland

Copy link
Copy Markdown
Owner

LGTM, thanks for the submission

BrianBland added a commit that referenced this pull request Feb 23, 2016
[WIP] Storagedriver: GCS: Add new StorageDriver.FileWriter implementation
@BrianBland
BrianBland merged commit a016461 into BrianBland:newStorageDriverWriter Feb 23, 2016
BrianBland pushed a commit that referenced this pull request Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants