diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-05-27 11:52:26 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-05-27 11:52:26 -0700 |
| commit | 458ada173ed6df2933c35fe0d3e3dd9457d3a975 (patch) | |
| tree | 30f174c167b3299eedde32419ad1894f43cd544d /weed/filesys | |
| parent | 8647191bee2027232105b20b5c110ffda225f9ba (diff) | |
| download | seaweedfs-458ada173ed6df2933c35fe0d3e3dd9457d3a975.tar.xz seaweedfs-458ada173ed6df2933c35fe0d3e3dd9457d3a975.zip | |
go fmt
Diffstat (limited to 'weed/filesys')
| -rw-r--r-- | weed/filesys/dir.go | 4 | ||||
| -rw-r--r-- | weed/filesys/file.go | 6 | ||||
| -rw-r--r-- | weed/filesys/filehandle.go | 13 | ||||
| -rw-r--r-- | weed/filesys/wfs.go | 4 |
4 files changed, 14 insertions, 13 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 6406dff95..e53c4cfaf 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -7,12 +7,12 @@ import ( "path" "sync" - "bazil.org/fuse/fs" "bazil.org/fuse" + "bazil.org/fuse/fs" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "time" "path/filepath" + "time" ) type Dir struct { diff --git a/weed/filesys/file.go b/weed/filesys/file.go index d63f9d62d..7ea14cc49 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -1,15 +1,15 @@ package filesys import ( - "context" "bazil.org/fuse" "bazil.org/fuse/fs" + "context" + "github.com/chrislusf/seaweedfs/weed/filer2" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "path/filepath" "os" + "path/filepath" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" ) var _ = fs.Node(&File{}) diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index d9dc6795e..81aca42a4 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -1,19 +1,19 @@ package filesys import ( + "bazil.org/fuse" "bazil.org/fuse/fs" + "bytes" + "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/filer2" - "context" "github.com/chrislusf/seaweedfs/weed/glog" - "bazil.org/fuse" - "bytes" "github.com/chrislusf/seaweedfs/weed/operation" - "time" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "strings" "sync" - "github.com/chrislusf/seaweedfs/weed/util" + "time" ) type FileHandle struct { @@ -32,6 +32,7 @@ type FileHandle struct { } var _ = fs.Handle(&FileHandle{}) + // var _ = fs.HandleReadAller(&FileHandle{}) var _ = fs.HandleReader(&FileHandle{}) var _ = fs.HandleFlusher(&FileHandle{}) diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 9f8f4649a..1b843e2d7 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -3,9 +3,9 @@ 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 { @@ -15,7 +15,7 @@ type WFS struct { func NewSeaweedFileSystem(filer string) *WFS { return &WFS{ - filer: filer, + filer: filer, listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)), } } |
