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

@@ -158,7 +158,7 @@ func newNode(t *testing.T, prefix string, https *httptest.Server) testNode {
if err != nil {
t.Fatalf("NewFakeEngine: %v\n", err)
}
n, err := NewLocalBackend(logf, prefix, e1)
n, err := NewLocalBackend(logf, prefix, &MemoryStore{}, e1)
if err != nil {
t.Fatalf("NewLocalBackend: %v\n", err)
}