ipn/store: remove a layer of indirection for registering stores (#15986)

Registering a new store is cheap, it just adds a map entry. No need to
lazy-init it with sync.Once and an intermediate slice holding init
functions.

Updates #cleanup

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
Andrew Lytvynov
2025-05-21 08:47:23 -07:00
committed by GitHub
parent 5a8b99e977
commit 0bab16448e
4 changed files with 4 additions and 21 deletions

View File

@@ -14,10 +14,6 @@ import (
)
func init() {
registerAvailableExternalStores = append(registerAvailableExternalStores, registerKubeStore)
}
func registerKubeStore() {
Register("kube:", func(logf logger.Logf, path string) (ipn.StateStore, error) {
secretName := strings.TrimPrefix(path, "kube:")
return kubestore.New(logf, secretName)