You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/control/controlclient
Nick Khyl da9965d51c cmd/viewer,types/views,various: avoid allocations in pointer field getters whenever possible
In this PR, we add a generic views.ValuePointer type that can be used as a view for pointers
to basic types and struct types that do not require deep cloning and do not have corresponding
view types. Its Get/GetOk methods return stack-allocated shallow copies of the underlying value.

We then update the cmd/viewer codegen to produce getters that return either concrete views
when available or ValuePointer views when not, for pointer fields in generated view types.
This allows us to avoid unnecessary allocations compared to returning pointers to newly
allocated shallow copies.

Updates #14570

Signed-off-by: Nick Khyl <nickk@tailscale.com>
11 months ago
..
auto.go control/controlclient: delete unused Client.Login Oauth2Token field 2 years ago
client.go control/controlclient: delete unused Client.Login Oauth2Token field 2 years ago
controlclient_test.go all: use Go 1.22 range-over-int 2 years ago
direct.go all: add means to set device posture attributes from node 11 months ago
direct_test.go tka: test SigCredential signatures and netmap filtering 1 year ago
map.go cmd/viewer,types/views,various: avoid allocations in pointer field getters whenever possible 11 months ago
map_test.go control/controlclient: remove optimization that was more convoluted than useful 11 months ago
noise.go controlclient: do not set HTTPS port for any private coordination server IP (#14564) 11 months ago
noise_test.go controlclient: do not set HTTPS port for any private coordination server IP (#14564) 11 months ago
sign.go all: update copyright and license headers 3 years ago
sign_supported.go control/controlclient: use the most recent syspolicy.MachineCertificateSubject value 1 year ago
sign_supported_test.go all: update copyright and license headers 3 years ago
sign_unsupported.go control/controlclient: support certstore without cgo 2 years ago
status.go all: implement AppendText alongside MarshalText (#9207) 2 years ago