mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
todo: load path-specific store from filer.toml
This commit is contained in:
parent
3269fd7eaf
commit
0d5683fb0e
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue