Add context to the object-interface methods.

Make necessary changes to xl fs azure sia
This commit is contained in:
Krishna Srinivas
2018-03-14 12:01:47 -07:00
committed by kannappanr
parent 9083bc152e
commit e452377b24
58 changed files with 844 additions and 610 deletions

View File

@@ -17,6 +17,7 @@
package cmd
import (
"context"
"net"
"net/http"
"strings"
@@ -231,10 +232,10 @@ func isETagEqual(left, right string) bool {
// deleteObject is a convenient wrapper to delete an object, this
// is a common function to be called from object handlers and
// web handlers.
func deleteObject(obj ObjectLayer, bucket, object string, r *http.Request) (err error) {
func deleteObject(ctx context.Context, obj ObjectLayer, bucket, object string, r *http.Request) (err error) {
// Proceed to delete the object.
if err = obj.DeleteObject(bucket, object); err != nil {
if err = obj.DeleteObject(ctx, bucket, object); err != nil {
return err
}