mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 00:51:07 +00:00
tailcfg: pointerify RegisterRequest.Auth, omitemptify RegisterResponseAuth
We were storing server-side lots of: "Auth":{"Provider":"","LoginName":"","Oauth2Token":null,"AuthKey":""}, That was about 7% of our total storage of pending RegisterRequest bodies. Updates tailscale/corp#19327 Change-Id: Ib73842759a2b303ff5fe4c052a76baea0d68ae7d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
375617c5c8
commit
05bfa022f2
@@ -335,7 +335,7 @@ func (src *RegisterRequest) Clone() *RegisterRequest {
|
||||
}
|
||||
dst := new(RegisterRequest)
|
||||
*dst = *src
|
||||
dst.Auth = *src.Auth.Clone()
|
||||
dst.Auth = src.Auth.Clone()
|
||||
dst.Hostinfo = src.Hostinfo.Clone()
|
||||
dst.NodeKeySignature = append(src.NodeKeySignature[:0:0], src.NodeKeySignature...)
|
||||
if dst.Timestamp != nil {
|
||||
@@ -353,7 +353,7 @@ var _RegisterRequestCloneNeedsRegeneration = RegisterRequest(struct {
|
||||
NodeKey key.NodePublic
|
||||
OldNodeKey key.NodePublic
|
||||
NLKey key.NLPublic
|
||||
Auth RegisterResponseAuth
|
||||
Auth *RegisterResponseAuth
|
||||
Expiry time.Time
|
||||
Followup string
|
||||
Hostinfo *Hostinfo
|
||||
|
Reference in New Issue
Block a user