Introduce a state store to LocalBackend.

The store is passed-in by callers of NewLocalBackend and
ipnserver.Run, but currently all callers are hardcoded to
an in-memory store. The store is unused.

Signed-Off-By: David Anderson <dave@natulte.net>
This commit is contained in:
David Anderson
2020-02-03 10:35:52 -08:00
committed by Dave Anderson
parent 21280ca2d1
commit 5bc632271b
9 changed files with 382 additions and 25 deletions

View File

@@ -33,6 +33,9 @@ type Prefs struct {
Persist *controlclient.Persist `json:"Config"`
}
// IsEmpty reports whether p is nil or pointing to a Prefs zero value.
func (uc *Prefs) IsEmpty() bool { return uc == nil || *uc == Prefs{} }
func (uc *Prefs) Pretty() string {
var ucp string
if uc.Persist != nil {