aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/source/filer_source.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/replication/source/filer_source.go')
-rw-r--r--weed/replication/source/filer_source.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/replication/source/filer_source.go b/weed/replication/source/filer_source.go
index 69c23fe82..9106ee98b 100644
--- a/weed/replication/source/filer_source.go
+++ b/weed/replication/source/filer_source.go
@@ -28,13 +28,13 @@ type FilerSource struct {
}
func (fs *FilerSource) Initialize(configuration util.Configuration, prefix string) error {
- return fs.initialize(
+ return fs.DoInitialize(
configuration.GetString(prefix+"grpcAddress"),
configuration.GetString(prefix+"directory"),
)
}
-func (fs *FilerSource) initialize(grpcAddress string, dir string) (err error) {
+func (fs *FilerSource) DoInitialize(grpcAddress string, dir string) (err error) {
fs.grpcAddress = grpcAddress
fs.Dir = dir
fs.grpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")
@@ -79,16 +79,16 @@ func (fs *FilerSource) LookupFileId(part string) (fileUrl string, err error) {
return
}
-func (fs *FilerSource) ReadPart(part string) (filename string, header http.Header, readCloser io.ReadCloser, err error) {
+func (fs *FilerSource) ReadPart(part string) (filename string, header http.Header, resp *http.Response, err error) {
fileUrl, err := fs.LookupFileId(part)
if err != nil {
return "", nil, nil, err
}
- filename, header, readCloser, err = util.DownloadFile(fileUrl)
+ filename, header, resp, err = util.DownloadFile(fileUrl)
- return filename, header, readCloser, err
+ return filename, header, resp, err
}
var _ = filer_pb.FilerClient(&FilerSource{})