wgengine: don't Reconfig on boring link changes

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2020-03-12 20:10:11 -07:00
committed by Brad Fitzpatrick
parent 7dd63abaed
commit db31550854
3 changed files with 54 additions and 37 deletions

View File

@@ -125,6 +125,12 @@ type Engine interface {
// link has changed. The isExpensive parameter is set on links
// where sending packets uses substantial power or money,
// such as mobile data on a phone.
//
// LinkChange should be called whenever something changed with
// the network, no matter how minor. The implementation should
// look at the state of the network and decide whether the
// change from before is interesting enough to warrant taking
// action on.
LinkChange(isExpensive bool)
// SetDERPEnabled controls whether DERP is enabled.