Make used of typed atomic.Pointer (#23550)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2ac375b3fe
Коммит
7a9a098ce4
@@ -198,10 +198,7 @@ func (ps *PlatformService) regenerateClientConfig() {
|
||||
|
||||
// AsymmetricSigningKey will return a private key that can be used for asymmetric signing.
|
||||
func (ps *PlatformService) AsymmetricSigningKey() *ecdsa.PrivateKey {
|
||||
if key := ps.asymmetricSigningKey.Load(); key != nil {
|
||||
return key.(*ecdsa.PrivateKey)
|
||||
}
|
||||
return nil
|
||||
return ps.asymmetricSigningKey.Load()
|
||||
}
|
||||
|
||||
// EnsureAsymmetricSigningKey ensures that an asymmetric signing key exists and future calls to
|
||||
|
||||
Ссылка в новой задаче
Block a user