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/feature
Brad Fitzpatrick 3bc10ea585 ipn/ipnext: remove some interface indirection to add hooks
Now that 25c4dc5fd7 removed unregistering hooks and made them into
slices, just expose the slices and remove the setter funcs.

This removes boilerplate ceremony around adding new hooks.

This does export the hooks and make them mutable at runtime in theory,
but that'd be a data race. If we really wanted to lock it down in the
future we could make the feature.Hooks slice type be an opaque struct
with an All() iterator and a "frozen" bool and we could freeze all the
hooks after init. But that doesn't seem worth it.

This means that hook registration is also now all in one place, rather
than being mixed into ProfilesService vs ipnext.Host vs FooService vs
BarService. I view that as a feature. When we have a ton of hooks and
the list is long, then we can rearrange the fields in the Hooks struct
as needed, or make sub-structs, or big comments.

Updates #12614

Change-Id: I05ce5baa45a61e79c04591c2043c05f3288d8587
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
8 months ago
..
capture feature/capture: move packet capture to feature/*, out of iOS + CLI 11 months ago
condregister feature/taildrop: start moving Taildrop out of LocalBackend 8 months ago
relayserver ipn/ipnext: remove some interface indirection to add hooks 8 months ago
taildrop ipn/{ipnext,ipnlocal}: add a SafeBackend interface 8 months ago
tap net/tstun: move TAP support out to separate package feature/tap 11 months ago
wakeonlan feature/*: make Wake-on-LAN conditional, start supporting modular features 11 months ago
feature.go ipn/ipnext: remove some interface indirection to add hooks 8 months ago