diff options
| author | David Anderson <danderson@tailscale.com> | 2021-10-29 16:02:38 -0700 |
|---|---|---|
| committer | David Anderson <danderson@tailscale.com> | 2021-10-29 16:04:45 -0700 |
| commit | ff16e58d234503ce5dc125fa4c4a1185688aea73 (patch) | |
| tree | 91577787f14cf18112161cb8b5676e4751784b3a /types/key/node.go | |
| parent | 15d329b4faa03b875db1fc990b12ba69a890d3ff (diff) | |
| download | tailscale-danderson/nodekey-move.tar.xz tailscale-danderson/nodekey-move.zip | |
tailcfg: move NodeKey type to types/key.danderson/nodekey-move
This leaves behind a type alias and associated constructor, to allow
for gradual switchover.
Updates #3206.
Signed-off-by: David Anderson <danderson@tailscale.com>
Diffstat (limited to 'types/key/node.go')
| -rw-r--r-- | types/key/node.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/types/key/node.go b/types/key/node.go index c83aba15a..bf7088c3d 100644 --- a/types/key/node.go +++ b/types/key/node.go @@ -307,3 +307,10 @@ func (k NodePublic) WireGuardGoString() string { b[second+3] = b64((k.k[31] << 2) & 63) return string(b) } + +// AsNodeKey returns k converted to a NodeKey. +// +// Cross-compatibility shim as part of #3206. +func (k NodePublic) AsNodeKey() NodeKey { + return k.Raw32() +} |
