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/security/tls.go | |
| parent | 38d516251eb080e56ee16747684e808a06cb6702 (diff) | |
| download | seaweedfs-cfb9342a15ce73c1e04c0e690cf87f65133bcf1b.tar.xz seaweedfs-cfb9342a15ce73c1e04c0e690cf87f65133bcf1b.zip | |
avoid concurrent map updates to viper
Diffstat (limited to 'weed/security/tls.go')
| -rw-r--r-- | weed/security/tls.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/weed/security/tls.go b/weed/security/tls.go index 72363768f..b4bf84e2d 100644 --- a/weed/security/tls.go +++ b/weed/security/tls.go @@ -3,17 +3,16 @@ package security import ( "crypto/tls" "crypto/x509" + "github.com/chrislusf/seaweedfs/weed/util" "io/ioutil" - "github.com/spf13/viper" - "google.golang.org/grpc" "google.golang.org/grpc/credentials" "github.com/chrislusf/seaweedfs/weed/glog" ) -func LoadServerTLS(config *viper.Viper, component string) grpc.ServerOption { +func LoadServerTLS(config *util.ViperProxy, component string) grpc.ServerOption { if config == nil { return nil } @@ -40,7 +39,7 @@ func LoadServerTLS(config *viper.Viper, component string) grpc.ServerOption { return grpc.Creds(ta) } -func LoadClientTLS(config *viper.Viper, component string) grpc.DialOption { +func LoadClientTLS(config *util.ViperProxy, component string) grpc.DialOption { if config == nil { return grpc.WithInsecure() } |
