mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 06:57:31 +00:00
all: update the tsd.System constructor name (#15372)
Replace NewSystemWithEventBus with plain NewSystem, and update all usage. See https://github.com/tailscale/tailscale/pull/15355#discussion_r2003910766 Updates #15160 Change-Id: I64d337f09576b41d9ad78eba301a74b9a9d6ebf4 Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:

committed by
M. J. Fromberger

parent
baead61e44
commit
deb0b255ff
@@ -40,6 +40,10 @@ import (
|
||||
)
|
||||
|
||||
// System contains all the subsystems of a Tailscale node (tailscaled, etc.)
|
||||
//
|
||||
// A valid System value must always have a non-nil Bus populated. Callers must
|
||||
// ensure this before using the value further. Call [NewSystem] to obtain a
|
||||
// value ready to use.
|
||||
type System struct {
|
||||
Bus SubSystem[*eventbus.Bus]
|
||||
Dialer SubSystem[*tsdial.Dialer]
|
||||
@@ -72,9 +76,9 @@ type System struct {
|
||||
userMetricsRegistry usermetric.Registry
|
||||
}
|
||||
|
||||
// NewSystemWithEventBus constructs a new otherwise-empty system with a
|
||||
// NewSystem constructs a new otherwise-empty [System] with a
|
||||
// freshly-constructed event bus populated.
|
||||
func NewSystemWithEventBus() *System {
|
||||
func NewSystem() *System {
|
||||
sys := new(System)
|
||||
sys.Set(eventbus.New())
|
||||
return sys
|
||||
|
Reference in New Issue
Block a user