ipn: update comments that refer to Options.Prefs

Things are slightly less tangled now that we've migrated prefs to the
backend (and renamed the field to LegacyMigrationPrefs).

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
pull/6607/head
Mihai Parparita 2 years ago committed by Mihai Parparita
parent b9dd3fa534
commit a87e0b4ea8

@ -192,23 +192,14 @@ type Options struct {
// frontend to the backend. // frontend to the backend.
// If non-nil, they are imported as a new profile. // If non-nil, they are imported as a new profile.
LegacyMigrationPrefs *Prefs `json:"Prefs"` LegacyMigrationPrefs *Prefs `json:"Prefs"`
// UpdatePrefs, if provided, overrides Options.Prefs *and* the Prefs // UpdatePrefs, if provided, overrides Options.LegacyMigrationPrefs
// already stored in the backend state, *except* for the Persist // *and* the Prefs already stored in the backend state, *except* for
// Persist member. If you just want to provide prefs, this is // the Persist member. If you just want to provide prefs, this is
// probably what you want. // probably what you want.
// //
// UpdatePrefs.Persist is always ignored. Prefs.Persist will still // TODO(apenwarr): Rename this to Prefs, and possibly move Prefs.Persist
// be used even if UpdatePrefs is provided. Other than Persist, // elsewhere entirely (as it always should have been). Or, move the
// UpdatePrefs takes precedence over Prefs. // fancy state migration stuff out of Start().
//
// This is intended as a purely temporary workaround for the
// currently unexpected behaviour of Options.Prefs.
//
// TODO(apenwarr): Remove this, or rename Prefs to something else
// and rename this to Prefs. Or, move Prefs.Persist elsewhere
// entirely (as it always should have been), and then we wouldn't
// need two separate fields at all. Or, move the fancy state
// migration stuff out of Start().
UpdatePrefs *Prefs UpdatePrefs *Prefs
// AuthKey is an optional node auth key used to authorize a // AuthKey is an optional node auth key used to authorize a
// new node key without user interaction. // new node key without user interaction.

@ -58,8 +58,9 @@ type Prefs struct {
// It would be more consistent to restart controlclient // It would be more consistent to restart controlclient
// automatically whenever this variable changes. // automatically whenever this variable changes.
// //
// Meanwhile, you have to provide this as part of Options.Prefs or // Meanwhile, you have to provide this as part of
// Options.UpdatePrefs when calling Backend.Start(). // Options.LegacyMigrationPrefs or Options.UpdatePrefs when
// calling Backend.Start().
ControlURL string ControlURL string
// RouteAll specifies whether to accept subnets advertised by // RouteAll specifies whether to accept subnets advertised by

Loading…
Cancel
Save