diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-01-12 02:28:13 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-01-12 02:28:13 -0800 |
| commit | cfb9342a15ce73c1e04c0e690cf87f65133bcf1b (patch) | |
| tree | 40e68e68d98472e8f942c04a501839a0135ef1c5 /weed/filer/configuration.go | |
| parent | 38d516251eb080e56ee16747684e808a06cb6702 (diff) | |
| download | seaweedfs-cfb9342a15ce73c1e04c0e690cf87f65133bcf1b.tar.xz seaweedfs-cfb9342a15ce73c1e04c0e690cf87f65133bcf1b.zip | |
avoid concurrent map updates to viper
Diffstat (limited to 'weed/filer/configuration.go')
| -rw-r--r-- | weed/filer/configuration.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/configuration.go b/weed/filer/configuration.go index a6f18709e..9ef2f3e0f 100644 --- a/weed/filer/configuration.go +++ b/weed/filer/configuration.go @@ -2,7 +2,7 @@ package filer import ( "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/spf13/viper" + "github.com/chrislusf/seaweedfs/weed/util" "os" "reflect" "strings" @@ -12,7 +12,7 @@ var ( Stores []FilerStore ) -func (f *Filer) LoadConfiguration(config *viper.Viper) { +func (f *Filer) LoadConfiguration(config *util.ViperProxy) { validateOneEnabledStore(config) @@ -79,7 +79,7 @@ func (f *Filer) LoadConfiguration(config *viper.Viper) { } -func validateOneEnabledStore(config *viper.Viper) { +func validateOneEnabledStore(config *util.ViperProxy) { enabledStore := "" for _, store := range Stores { if config.GetBool(store.GetName() + ".enabled") { |
