Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add logging to nodeUpdater#11569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 1 commit intomainfromspike/10355-nodeUpdater-logging
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletionstailnet/configmaps.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -137,6 +137,7 @@ func (c *configMaps) configLoop() {
c.Wait()
}
if c.closing {
c.logger.Debug(context.Background(), "closing configMaps configLoop")
return
}
// queue up the reconfiguration actions we will take while we have
Expand All@@ -146,19 +147,22 @@ func (c *configMaps) configLoop() {
if c.derpMapDirty {
derpMap := c.derpMapLocked()
actions = append(actions, func() {
c.logger.Debug(context.Background(), "updating engine DERP map", slog.F("derp_map", derpMap))
c.engine.SetDERPMap(derpMap)
})
}
if c.netmapDirty {
nm := c.netMapLocked()
actions = append(actions, func() {
c.logger.Debug(context.Background(), "updating engine network map", slog.F("network_map", nm))
c.engine.SetNetworkMap(nm)
c.reconfig(nm)
})
}
if c.filterDirty {
f := c.filterLocked()
actions = append(actions, func() {
c.logger.Debug(context.Background(), "updating engine filter", slog.F("filter", f))
c.engine.SetFilter(f)
})
}
Expand Down
4 changes: 4 additions & 0 deletionstailnet/node.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,6 +52,7 @@ func (u *nodeUpdater) updateLoop() {
u.Wait()
}
if u.closing {
u.logger.Debug(context.Background(), "closing nodeUpdater updateLoop")
return
}
node := u.nodeLocked()
Expand All@@ -68,6 +69,7 @@ func (u *nodeUpdater) updateLoop() {
}

u.L.Unlock()
u.logger.Debug(context.Background(), "calling nodeUpdater callback", slog.F("node", node))
u.callback(node)
u.L.Lock()
}
Expand DownExpand Up@@ -126,6 +128,8 @@ func (u *nodeUpdater) setNetInfo(ni *tailcfg.NetInfo) {
if u.preferredDERP != ni.PreferredDERP {
dirty = true
u.preferredDERP = ni.PreferredDERP
u.logger.Debug(context.Background(), "new preferred DERP",
slog.F("preferred_derp", u.preferredDERP))
}
if !maps.Equal(u.derpLatency, ni.DERPLatency) {
dirty = true
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp