Brad Fitzpatrick
43f3a969ca
types/views: add SliceContains, View.ContainsFunc, View.IndexFunc
...
We were starting to write these elsewhere as little unexported copies
in misc places.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-07-21 08:28:43 -07:00
Maisem Ali
6dae9e47f9
types/views: remove alloc in hot path
...
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-05-10 11:20:00 -07:00
Maisem Ali
395cb588b6
types/views: make SliceOf/MapOf panic if they see a pointer
...
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-05-09 19:49:31 -07:00
Maisem Ali
d04afc697c
cmd/viewer,types/views: add support for views of maps
...
Updates #4635
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-05-09 19:49:31 -07:00
Maisem Ali
c4e9739251
cmd/viewer: add codegen tool for Views
...
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-05-06 10:58:10 -07:00
Maisem Ali
bd073b8dd6
types/views: rename Generic to Unwrap
...
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-03-17 14:41:57 -07:00
Maisem Ali
6b9d938c1a
types/views: add generic Slice[T] and remove StringSlice
...
Also make IPPrefixSliceOf use Slice[netaddr.IPPrefix] as it also
provides additional functions besides the standard ones provided by
Slice[T].
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-03-16 22:13:16 -07:00
Maisem Ali
c85694fac4
types/views: add ContainsExitRoutes to IPPrefixSlice
...
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-03-04 09:08:42 -08:00
Maisem Ali
c7a8f0992d
ipn/ipnlocal: use views for Peer.PrimaryRoutes and Peer.Tags
...
RELNOTE=`tailscale status --json` now shows Tags and PrimaryRoutes
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-02-22 10:09:02 -08:00
Maisem Ali
53998e26a6
tailcfg: introduce HostinfoView
...
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-02-16 12:55:57 -08:00