chore: stop passing addresses on configMaps constructor (#11634)

moving this out of the constructor so that setting this when creating a new `tailnet.Conn` triggers configuring the engine.
This commit is contained in:
Spike Curtis
2024-01-18 09:43:28 +04:00
committed by GitHub
parent a514df71ed
commit e725f9d7d4
2 changed files with 22 additions and 16 deletions

View File

@ -72,7 +72,7 @@ type configMaps struct {
clock clock.Clock
}
func newConfigMaps(logger slog.Logger, engine engineConfigurable, nodeID tailcfg.NodeID, nodeKey key.NodePrivate, discoKey key.DiscoPublic, addresses []netip.Prefix) *configMaps {
func newConfigMaps(logger slog.Logger, engine engineConfigurable, nodeID tailcfg.NodeID, nodeKey key.NodePrivate, discoKey key.DiscoPublic) *configMaps {
pubKey := nodeKey.Public()
c := &configMaps{
phased: phased{Cond: *(sync.NewCond(&sync.Mutex{}))},
@ -114,9 +114,8 @@ func newConfigMaps(logger slog.Logger, engine engineConfigurable, nodeID tailcfg
Caps: []filter.CapMatch{},
}},
},
peers: make(map[uuid.UUID]*peerLifecycle),
addresses: addresses,
clock: clock.New(),
peers: make(map[uuid.UUID]*peerLifecycle),
clock: clock.New(),
}
go c.configLoop()
return c