all: generate discovery key, plumb it around

Not actually used yet.

Updates #483
This commit is contained in:
Brad Fitzpatrick
2020-06-19 12:06:49 -07:00
parent 88c305c8af
commit 53fb25fc2f
8 changed files with 45 additions and 0 deletions
+6
View File
@@ -11,6 +11,7 @@ import (
"github.com/tailscale/wireguard-go/wgcfg"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/types/key"
"tailscale.com/wgengine/filter"
"tailscale.com/wgengine/router"
"tailscale.com/wgengine/tsdns"
@@ -56,6 +57,7 @@ type Engine interface {
//
// This is called whenever the tailcontrol (control plane)
// sends an updated network map.
//
// The returned error is ErrNoChanges if no changes were made.
Reconfig(*wgcfg.Config, *router.Config) error
@@ -108,6 +110,10 @@ type Engine interface {
// new NetInfo summary is available.
SetNetInfoCallback(NetInfoCallback)
// SetDiscoPrivateKey sets the private key used for path discovery
// messages.
SetDiscoPrivateKey(key.Private)
// UpdateStatus populates the network state using the provided
// status builder.
UpdateStatus(*ipnstate.StatusBuilder)