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>
2025-01-14 09:37:10 -06:00
..
auto.go control/controlclient: delete unused Client.Login Oauth2Token field 2024-05-17 19:51:18 -07:00
client.go control/controlclient: delete unused Client.Login Oauth2Token field 2024-05-17 19:51:18 -07:00
controlclient_test.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
direct_test.go tka: test SigCredential signatures and netmap filtering 2024-06-27 19:28:57 +01:00
direct.go all: add means to set device posture attributes from node 2024-12-31 12:57:23 -08:00
map_test.go control/controlclient: remove optimization that was more convoluted than useful 2025-01-03 11:09:23 -08:00
map.go cmd/viewer,types/views,various: avoid allocations in pointer field getters whenever possible 2025-01-14 09:37:10 -06:00
noise_test.go controlclient: do not set HTTPS port for any private coordination server IP (#14564) 2025-01-07 10:24:32 -08:00
noise.go controlclient: do not set HTTPS port for any private coordination server IP (#14564) 2025-01-07 10:24:32 -08:00
sign_supported_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
sign_supported.go control/controlclient: use the most recent syspolicy.MachineCertificateSubject value 2024-11-22 14:50:32 -06:00
sign_unsupported.go control/controlclient: support certstore without cgo 2023-10-20 15:17:32 -04:00
sign.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
status.go all: implement AppendText alongside MarshalText (#9207) 2023-09-01 18:15:19 -07:00