Skip to content

Add golang/x/net/context.Context to storage driver method calls - #410

Merged
stevvooe merged 1 commit into
distribution:masterfrom
RichardScothern:driver-context
May 5, 2015
Merged

stevvooe merged 1 commit into
distribution:masterfrom
RichardScothern:driver-context

Conversation

@RichardScothern

Copy link
Copy Markdown

Make Storage Driver API calls context aware.

 - Change driver interface to take a context as its first argument
 - Make newFileReader take a context as its first argument
 - Make newFileWriter take a context as its first argument
 - Make blobstore exists and delete take a context as a first argument
 - Pass the layerreader's context to the storage layer
 - Pass the app's context to purgeuploads
 - Store the app's context into the blobstore (was previously null)
 - Pass the trace'd context to the storage drivers

Signed-off-by: Richard Scothern <[email protected]>

Closes: #264

Comment thread registry/handlers/app.go Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Context should be first argument.

@RichardScothern

Copy link
Copy Markdown
Author

Squashed previous commits.

@RichardScothern RichardScothern changed the title WIP: Add golang/x/net/context.Context to storage driver method calls Add golang/x/net/context.Context to storage driver method calls Apr 23, 2015
@RichardScothern

Copy link
Copy Markdown
Author

This is ready for the big time.

Comment thread registry/handlers/app.go Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

app should be the context here.

@stevvooe

Copy link
Copy Markdown
Collaborator

@RichardScothern Other than the list of items, I am pretty happy with this.

     - Change driver interface to take a context as its first argument
     - Make newFileReader take a context as its first argument
     - Make newFileWriter take a context as its first argument
     - Make blobstore exists and delete take a context as a first argument
     - Pass the layerreader's context to the storage layer
     - Pass the app's context to purgeuploads
     - Store the app's context into the blobstore (was previously null)
     - Pass the trace'd context to the storage drivers

Signed-off-by: Richard Scothern <[email protected]>
@RichardScothern

Copy link
Copy Markdown
Author

Review comments + rebase.

@stevvooe stevvooe added this to the Registry/2.1 milestone Apr 28, 2015
stevvooe added a commit that referenced this pull request May 5, 2015
Add golang/x/net/context.Context to storage driver method calls
@stevvooe
stevvooe merged commit dd58ffe into distribution:master May 5, 2015
@RichardScothern
RichardScothern deleted the driver-context branch May 6, 2015 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add golang/x/net/context.Context to storage driver method calls

4 participants