wgengine: simplify, change some signatures

* make RouterGen return an error, not take both tunname and tundev
* also remove RouteGen taking a wireguard/device.Device; currently unused
* remove derp parameter (it'll work differently)
* unexport NewUserspaceRouter in per-OS impls, add documented wrapper

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2020-02-14 15:03:25 -08:00
committed by Brad Fitzpatrick
parent 9dbc52bb5b
commit 79295b1138
12 changed files with 96 additions and 64 deletions
+1 -1
View File
@@ -12,6 +12,6 @@ import (
"tailscale.com/types/logger"
)
func NewUserspaceRouter(logf logger.Logf, tunname string, dev *device.Device, tuntap tun.Device, netChanged func()) Router {
func newUserspaceRouter(logf logger.Logf, tunname string, dev *device.Device, tuntap tun.Device, netChanged func()) Router {
return NewFakeRouter(logf, tunname, dev, tuntap, netChanged)
}