Add Context to Saver Interface (#179)

* Adding context to storage.Saver parameters

* +`buffalo.Context` as first param in storage.Saver

Fixes #177

* Parallelizing Upload to Azure Blob Storage

Fixes #175

* Fixing import clausing

* go fmt ./...

* Populating default context

* CI: Echo files modified by gofmt check to stderr

Doing so allows users to see which files still need to be formatted.

* Upgrading Go, then go fmt ./...

* Addressing Feedback

* more responding to feedback

* Adding worker save Default Context

* Removing tracing, buffalo.Context usage in Storage interface

github.com/bketelsen/buffet relies on using a `buffalo.Context`
however, often a `storage.Saver` is invoked from a buffalo worker,
which has no buffalo.Context associated with it. Therefore, we had
two options: create a buffalo context for each worker's Job, or
remove the buffalo.Context dependency in the Saver interface.

* Fixing missed changes

* Review feedback
This commit is contained in:
Martin Strobel
2018-06-21 10:47:31 -07:00
committed by Aaron Schlesinger
parent da5b269c2d
commit d0a18e7dd4
23 changed files with 97 additions and 41 deletions
+2 -1
View File
@@ -1,12 +1,13 @@
package minio
import (
"context"
"io/ioutil"
)
func (d *MinioTests) TestGetSaveListRoundTrip() {
r := d.Require()
r.NoError(d.storage.Save(module, version, mod, zip, info))
r.NoError(d.storage.Save(context.Background(), module, version, mod, zip, info))
listedVersions, err := d.storage.List(module)
r.NoError(err)
r.Equal(1, len(listedVersions))