diff options
| author | vadimartynov <166398828+vadimartynov@users.noreply.github.com> | 2024-07-16 19:15:55 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-16 09:15:55 -0700 |
| commit | b796c21fa9cce9360900b18253c182fd5ca92763 (patch) | |
| tree | 681ca1f3def0379f7a3ece698de7d0c443440443 /weed/util/config.go | |
| parent | 67edf1d01413f330d6983125b94e5c3d40a845f2 (diff) | |
| download | seaweedfs-b796c21fa9cce9360900b18253c182fd5ca92763.tar.xz seaweedfs-b796c21fa9cce9360900b18253c182fd5ca92763.zip | |
Added loadSecurityConfigOnce (#5792)
Diffstat (limited to 'weed/util/config.go')
| -rw-r--r-- | weed/util/config.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/util/config.go b/weed/util/config.go index a242742fc..7ac765ff5 100644 --- a/weed/util/config.go +++ b/weed/util/config.go @@ -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 |
