aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-18 03:05:42 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-18 03:05:42 -0800
commit0d5683fb0e6b1afe5fe7dadaa05361c0d698e795 (patch)
tree1c893c36621ed6d9e6f84ac534ca34e627327305
parent3269fd7eafaaa5fc2bfb4a88f0cfaec2dc8f536e (diff)
downloadseaweedfs-0d5683fb0e6b1afe5fe7dadaa05361c0d698e795.tar.xz
seaweedfs-0d5683fb0e6b1afe5fe7dadaa05361c0d698e795.zip
todo: load path-specific store from filer.toml
-rw-r--r--weed/filer/configuration.go3
-rw-r--r--weed/filer/filerstore.go3
2 files changed, 5 insertions, 1 deletions
diff --git a/weed/filer/configuration.go b/weed/filer/configuration.go
index 3dce67d6d..d04ab06cb 100644
--- a/weed/filer/configuration.go
+++ b/weed/filer/configuration.go
@@ -27,6 +27,9 @@ func (f *Filer) LoadConfiguration(config *viper.Viper) {
}
}
+ // TODO load path-specific filer store here
+ // f.Store.AddPathSpecificStore(path, store)
+
println()
println("Supported filer stores are:")
for _, store := range Stores {
diff --git a/weed/filer/filerstore.go b/weed/filer/filerstore.go
index a2b81c5d9..5e10bb0a6 100644
--- a/weed/filer/filerstore.go
+++ b/weed/filer/filerstore.go
@@ -50,6 +50,7 @@ type VirtualFilerStore interface {
FilerStore
DeleteHardLink(ctx context.Context, hardLinkId HardLinkId) error
DeleteOneEntry(ctx context.Context, entry *Entry) error
+ AddPathSpecificStore(path string, store FilerStore)
}
type FilerStoreWrapper struct {
@@ -67,7 +68,7 @@ func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper {
}
}
-func (fsw *FilerStoreWrapper) addStore(path string, store FilerStore) {
+func (fsw *FilerStoreWrapper) AddPathSpecificStore(path string, store FilerStore) {
fsw.pathToStore.Put([]byte(path), store)
}