mirror of
https://github.com/tailscale/tailscale.git
synced 2025-06-07 16:28:37 +00:00

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>
23 lines
515 B
Go
23 lines
515 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build (ts_aws || (linux && (arm64 || amd64) && !android)) && !ts_omit_aws
|
|
|
|
package store
|
|
|
|
import (
|
|
"tailscale.com/ipn"
|
|
"tailscale.com/ipn/store/awsstore"
|
|
"tailscale.com/types/logger"
|
|
)
|
|
|
|
func init() {
|
|
Register("arn:", func(logf logger.Logf, arg string) (ipn.StateStore, error) {
|
|
ssmARN, opts, err := awsstore.ParseARNAndOpts(arg)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return awsstore.New(logf, ssmARN, opts...)
|
|
})
|
|
}
|