Make used of typed atomic.Pointer (#23550)

Этот коммит содержится в:
Ben Schumacher
2023-05-31 12:56:01 +02:00
коммит произвёл GitHub
родитель 2ac375b3fe
Коммит 7a9a098ce4
6 изменённых файлов: 14 добавлений и 17 удалений

Просмотреть файл

@@ -4,6 +4,7 @@
package platform
import (
"crypto/ecdsa"
"fmt"
"hash/maphash"
"net/http"
@@ -49,7 +50,7 @@ type PlatformService struct {
sessionCache cache.Cache
sessionPool sync.Pool
asymmetricSigningKey atomic.Value
asymmetricSigningKey atomic.Pointer[ecdsa.PrivateKey]
clientConfig atomic.Value
clientConfigHash atomic.Value
limitedClientConfig atomic.Value
@@ -67,7 +68,7 @@ type PlatformService struct {
featureFlagStop chan struct{}
featureFlagStopped chan struct{}
licenseValue atomic.Value
licenseValue atomic.Pointer[model.License]
clientLicenseValue atomic.Value
licenseListeners map[string]func(*model.License, *model.License)
licenseManager einterfaces.LicenseInterface