aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_handlers.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@uber.com>2019-03-15 17:20:24 -0700
committerChris Lu <chris.lu@uber.com>2019-03-15 17:20:24 -0700
commit55bab1b456c3c13a8009a11730e678ca0c48dfb0 (patch)
treec7609b465c8444fc7538cb7f9392011840e1b38c /weed/s3api/s3api_handlers.go
parentcece860bfde443d4f8cddb04b10fb98a998995ed (diff)
downloadseaweedfs-55bab1b456c3c13a8009a11730e678ca0c48dfb0.tar.xz
seaweedfs-55bab1b456c3c13a8009a11730e678ca0c48dfb0.zip
add context.Context
Diffstat (limited to 'weed/s3api/s3api_handlers.go')
-rw-r--r--weed/s3api/s3api_handlers.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/s3api/s3api_handlers.go b/weed/s3api/s3api_handlers.go
index 5d92085cc..5a63648ca 100644
--- a/weed/s3api/s3api_handlers.go
+++ b/weed/s3api/s3api_handlers.go
@@ -2,6 +2,7 @@ package s3api
import (
"bytes"
+ "context"
"encoding/base64"
"encoding/xml"
"fmt"
@@ -35,9 +36,9 @@ func encodeResponse(response interface{}) []byte {
return bytesBuffer.Bytes()
}
-func (s3a *S3ApiServer) withFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
+func (s3a *S3ApiServer) withFilerClient(ctx context.Context, fn func(filer_pb.SeaweedFilerClient) error) error {
- grpcConnection, err := util.GrpcDial(s3a.option.FilerGrpcAddress, s3a.option.GrpcDialOption)
+ grpcConnection, err := util.GrpcDial(ctx, s3a.option.FilerGrpcAddress, s3a.option.GrpcDialOption)
if err != nil {
return fmt.Errorf("fail to dial %s: %v", s3a.option.FilerGrpcAddress, err)
}