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 <richard.scothern@gmail.com>
This commit is contained in:
parent
c0d297c011
commit
5d9105bd25
30 changed files with 383 additions and 343 deletions
|
@ -26,7 +26,7 @@ func (rs *revisionStore) exists(revision digest.Digest) (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
exists, err := exists(rs.driver, revpath)
|
||||
exists, err := exists(rs.repository.ctx, rs.driver, revpath)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ func (rs *revisionStore) link(revision digest.Digest) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if exists, err := exists(rs.driver, revisionPath); err != nil {
|
||||
if exists, err := exists(rs.repository.ctx, rs.driver, revisionPath); err != nil {
|
||||
return err
|
||||
} else if exists {
|
||||
// Revision has already been linked!
|
||||
|
@ -142,5 +142,5 @@ func (rs *revisionStore) delete(revision digest.Digest) error {
|
|||
return err
|
||||
}
|
||||
|
||||
return rs.driver.Delete(revisionPath)
|
||||
return rs.driver.Delete(rs.repository.ctx, revisionPath)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue