mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 23:17:29 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user