Update machine.go

Added comment on toNode
This commit is contained in:
Juan Font 2021-09-10 00:30:02 +02:00 committed by GitHub
parent 55f3e07bd4
commit b937f9b762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,6 +50,8 @@ func (m Machine) isAlreadyRegistered() bool {
return m.Registered
}
// toNode converts a Machine into a Tailscale Node. includeRoutes is false for shared nodes
// as per the expected behaviour in the official SaaS
func (m Machine) toNode(includeRoutes bool) (*tailcfg.Node, error) {
nKey, err := wgkey.ParseHex(m.NodeKey)
if err != nil {