diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-06-05 23:37:41 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-06-05 23:37:41 -0700 |
| commit | 299312c8057c5b96f67a8ac825ee026fe01dd8fc (patch) | |
| tree | ec17f807d12adcb3fb4b8b35663258cfbeaeeb3f /weed/filesys/wfs.go | |
| parent | 95fe745a0cf98975172e5e8fc166647c48f52c80 (diff) | |
| download | seaweedfs-299312c8057c5b96f67a8ac825ee026fe01dd8fc.tar.xz seaweedfs-299312c8057c5b96f67a8ac825ee026fe01dd8fc.zip | |
use separate filer grpc port
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 4b9e20b95..ac7333695 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -9,16 +9,16 @@ import ( ) type WFS struct { - filer string + filerGrpcAddress string listDirectoryEntriesCache *ccache.Cache collection string replication string chunkSizeLimit int64 } -func NewSeaweedFileSystem(filer string, collection string, replication string, chunkSizeLimitMB int) *WFS { +func NewSeaweedFileSystem(filerGrpcAddress string, collection string, replication string, chunkSizeLimitMB int) *WFS { return &WFS{ - filer: filer, + filerGrpcAddress: filerGrpcAddress, listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)), collection: collection, replication: replication, @@ -32,9 +32,9 @@ func (wfs *WFS) Root() (fs.Node, error) { func (wfs *WFS) withFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error { - grpcConnection, err := grpc.Dial(wfs.filer, grpc.WithInsecure()) + grpcConnection, err := grpc.Dial(wfs.filerGrpcAddress, grpc.WithInsecure()) if err != nil { - return fmt.Errorf("fail to dial %s: %v", wfs.filer, err) + return fmt.Errorf("fail to dial %s: %v", wfs.filerGrpcAddress, err) } defer grpcConnection.Close() |
