load filer conf and match by prefix

This commit is contained in:
Chris Lu
2020-11-15 00:26:05 -08:00
parent 68043cfcac
commit 0a406f652e
5 changed files with 100 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
"github.com/viant/ptrie"
)
func ToFileIdObject(fileIdStr string) (*FileId, error) {
@@ -138,3 +139,8 @@ func IsRename(event *SubscribeMetadataResponse) bool {
event.EventNotification.OldEntry != nil &&
event.Directory != event.EventNotification.NewParentPath
}
var _ = ptrie.KeyProvider(&FilerConf_PathConf{})
func (fp *FilerConf_PathConf) Key() interface{} {
return fp.LocationPrefix
}