diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2020-09-17 10:29:32 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-17 10:29:32 +0800 |
| commit | f71f7fcf99ba6d64bfa49fd7411e06bdc2b9d591 (patch) | |
| tree | e0e98625edaab040eed21fd1a8b277f2c0546ad3 /weed/replication/source/filer_source.go | |
| parent | 23baa3c36ce468a36d89abae59f4411cdc446043 (diff) | |
| parent | 5eee4983f36f55a2a01381e8af278b28919dbe90 (diff) | |
| download | seaweedfs-f71f7fcf99ba6d64bfa49fd7411e06bdc2b9d591.tar.xz seaweedfs-f71f7fcf99ba6d64bfa49fd7411e06bdc2b9d591.zip | |
Merge pull request #15 from chrislusf/master
sync
Diffstat (limited to 'weed/replication/source/filer_source.go')
| -rw-r--r-- | weed/replication/source/filer_source.go | 10 |
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{}) |
