Update
This commit is contained in:
21
vendor/tailscale.com/ipn/store.go
generated
vendored
21
vendor/tailscale.com/ipn/store.go
generated
vendored
@@ -10,6 +10,8 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
"tailscale.com/health"
|
||||
)
|
||||
|
||||
// ErrStateNotExist is returned by StateStore.ReadState when the
|
||||
@@ -60,6 +62,19 @@ const (
|
||||
TaildropReceivedKey = StateKey("_taildrop-received")
|
||||
)
|
||||
|
||||
// StateStoreHealth is a Warnable set when store.New fails at startup. If
|
||||
// unhealthy, we block all login attempts and return a health message in status
|
||||
// responses.
|
||||
var StateStoreHealth = health.Register(&health.Warnable{
|
||||
Code: "state-store-health",
|
||||
Severity: health.SeverityHigh,
|
||||
Title: "Tailscale state store failed to initialize",
|
||||
Text: func(args health.Args) string {
|
||||
return fmt.Sprintf("State store failed to initialize, Tailscale will not work until this is resolved. See https://tailscale.com/s/state-store-init-error. Error: %s", args[health.ArgError])
|
||||
},
|
||||
ImpactsConnectivity: true,
|
||||
})
|
||||
|
||||
// CurrentProfileID returns the StateKey that stores the
|
||||
// current profile ID. The value is a JSON-encoded LoginProfile.
|
||||
// If the userID is empty, the key returned is CurrentProfileStateKey,
|
||||
@@ -113,3 +128,9 @@ func ReadStoreInt(store StateStore, id StateKey) (int64, error) {
|
||||
func PutStoreInt(store StateStore, id StateKey, val int64) error {
|
||||
return WriteState(store, id, fmt.Appendf(nil, "%d", val))
|
||||
}
|
||||
|
||||
// EncryptedStateStore is a marker interface implemented by StateStores that
|
||||
// encrypt data at rest.
|
||||
type EncryptedStateStore interface {
|
||||
stateStoreIsEncrypted()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user