diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2019-02-18 15:05:32 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-18 15:05:32 -0800 |
| commit | 9a4dda30118fa4e076b2ef4ea6abe14ca898a84e (patch) | |
| tree | c5d379b2a92d78607e82246ca2abed09bd1c0b2d /weed/filer2/filer.go | |
| parent | a1c7dc380683d44e59a18c2e71c9c3aa7734835f (diff) | |
| parent | 77b9af531d18e10b04b49b069b5f26a329ed4902 (diff) | |
| download | seaweedfs-9a4dda30118fa4e076b2ef4ea6abe14ca898a84e.tar.xz seaweedfs-9a4dda30118fa4e076b2ef4ea6abe14ca898a84e.zip | |
Merge pull request #855 from chrislusf/add_jwt
Add jwt
Diffstat (limited to 'weed/filer2/filer.go')
| -rw-r--r-- | weed/filer2/filer.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go index 1ee2f5ede..672c6201c 100644 --- a/weed/filer2/filer.go +++ b/weed/filer2/filer.go @@ -3,6 +3,7 @@ package filer2 import ( "context" "fmt" + "google.golang.org/grpc" "math" "os" "path/filepath" @@ -24,13 +25,15 @@ type Filer struct { directoryCache *ccache.Cache MasterClient *wdclient.MasterClient fileIdDeletionChan chan string + GrpcDialOption grpc.DialOption } -func NewFiler(masters []string) *Filer { +func NewFiler(masters []string, grpcDialOption grpc.DialOption) *Filer { f := &Filer{ directoryCache: ccache.New(ccache.Configure().MaxSize(1000).ItemsToPrune(100)), - MasterClient: wdclient.NewMasterClient(context.Background(), "filer", masters), + MasterClient: wdclient.NewMasterClient(context.Background(), grpcDialOption, "filer", masters), fileIdDeletionChan: make(chan string, 4096), + GrpcDialOption: grpcDialOption, } go f.loopProcessingDeletion() |
