mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 01:33:34 +08:00
Added loadSecurityConfigOnce (#5792)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
var (
|
||||
ConfigurationFileDirectory DirectoryValueType
|
||||
loadSecurityConfigOnce sync.Once
|
||||
)
|
||||
|
||||
type DirectoryValueType string
|
||||
@@ -31,6 +32,12 @@ type Configuration interface {
|
||||
SetDefault(key string, value interface{})
|
||||
}
|
||||
|
||||
func LoadSecurityConfiguration(){
|
||||
loadSecurityConfigOnce.Do(func() {
|
||||
LoadConfiguration("security", false)
|
||||
})
|
||||
}
|
||||
|
||||
func LoadConfiguration(configFileName string, required bool) (loaded bool) {
|
||||
|
||||
// find a filer store
|
||||
|
Reference in New Issue
Block a user