aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/wfs.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-06-02 00:35:03 -0700
committerChris Lu <chris.lu@gmail.com>2018-06-02 00:35:03 -0700
commitc546c309f10154688431433c031d62dc20edfc85 (patch)
tree69670656b3f740cd1f05e8fe646d2cae51c9aff5 /weed/filesys/wfs.go
parent3a3553dc463a8f5f5739b58e325da4f14650517b (diff)
parenta146a48ccc16848a9c2f24b64864e9566db8ab7c (diff)
downloadseaweedfs-c546c309f10154688431433c031d62dc20edfc85.tar.xz
seaweedfs-c546c309f10154688431433c031d62dc20edfc85.zip
Merge branch 'filer2_development'
Diffstat (limited to 'weed/filesys/wfs.go')
-rw-r--r--weed/filesys/wfs.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go
index da50ae4a4..4b9e20b95 100644
--- a/weed/filesys/wfs.go
+++ b/weed/filesys/wfs.go
@@ -3,17 +3,26 @@ package filesys
import (
"bazil.org/fuse/fs"
"fmt"
- "google.golang.org/grpc"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
+ "github.com/karlseguin/ccache"
+ "google.golang.org/grpc"
)
type WFS struct {
- filer string
+ filer string
+ listDirectoryEntriesCache *ccache.Cache
+ collection string
+ replication string
+ chunkSizeLimit int64
}
-func NewSeaweedFileSystem(filer string) *WFS {
+func NewSeaweedFileSystem(filer string, collection string, replication string, chunkSizeLimitMB int) *WFS {
return &WFS{
- filer: filer,
+ filer: filer,
+ listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)),
+ collection: collection,
+ replication: replication,
+ chunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024,
}
}