ipn/ipnlocal: add support for multiple user profiles

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-11-09 10:58:10 +05:00
committed by Maisem Ali
parent c9d6a9cb4d
commit 4d330bac14
29 changed files with 1106 additions and 436 deletions
+2 -2
View File
@@ -16,13 +16,13 @@ type FakeBackend struct {
}
func (b *FakeBackend) Start(opts Options) error {
b.serverURL = opts.Prefs.ControlURLOrDefault()
b.serverURL = opts.LegacyMigrationPrefs.ControlURLOrDefault()
if b.notify == nil {
panic("FakeBackend.Start: SetNotifyCallback not called")
}
nl := NeedsLogin
if b.notify != nil {
p := opts.Prefs.View()
p := opts.LegacyMigrationPrefs.View()
b.notify(Notify{Prefs: &p})
b.notify(Notify{State: &nl})
}