aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/stream.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-13 21:58:10 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-13 21:58:10 -0700
commitf282ed444baf6676c22df1b7c35964dd73d2c04a (patch)
tree69e594cba87ad2cba5303d02f77536916879aab8 /weed/filer2/stream.go
parentd8f5985e5e2a51719b7bf40a99c2728b475dbbf4 (diff)
downloadseaweedfs-f282ed444baf6676c22df1b7c35964dd73d2c04a.tar.xz
seaweedfs-f282ed444baf6676c22df1b7c35964dd73d2c04a.zip
refactoring
Diffstat (limited to 'weed/filer2/stream.go')
-rw-r--r--weed/filer2/stream.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer2/stream.go b/weed/filer2/stream.go
index bf3781ae2..3cb69f72b 100644
--- a/weed/filer2/stream.go
+++ b/weed/filer2/stream.go
@@ -31,7 +31,7 @@ func StreamContent(masterClient *wdclient.MasterClient, w io.Writer, chunks []*f
for _, chunkView := range chunkViews {
urlString := fileId2Url[chunkView.FileId]
- err := util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk, chunkView.Offset, int(chunkView.Size), func(data []byte) {
+ err := util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
w.Write(data)
})
if err != nil {
@@ -128,7 +128,7 @@ func (c *ChunkStreamReader) fetchChunkToBuffer(chunkView *ChunkView) error {
return err
}
var buffer bytes.Buffer
- err = util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk, chunkView.Offset, int(chunkView.Size), func(data []byte) {
+ err = util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
buffer.Write(data)
})
if err != nil {