util/eventbus: when ts_omit_debugeventbus is set, don't import tsweb

I'm trying to remove the "regexp" and "regexp/syntax" packages from
our minimal builds. But tsweb pulls in regexp (via net/http/pprof etc)
and util/eventbus was importing the tsweb for no reason.

Updates #12614

Change-Id: Ifa8c371ece348f1dbf80d6b251381f3ed39d5fbd
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2025-09-30 11:25:10 -07:00 committed by Brad Fitzpatrick
parent ee034d48fc
commit be6cfa00cb

View File

@ -5,9 +5,7 @@
package eventbus
import "tailscale.com/tsweb"
func registerHTTPDebugger(d *Debugger, td *tsweb.DebugHandler) {
func registerHTTPDebugger(d *Debugger, tsWebDebugHandler any) {
// The event bus debugging UI uses html/template, which uses
// reflection for method lookups. This forces the compiler to
// retain a lot more code and information to make dynamic method