Restructure version.Update to use channel

This commit is contained in:
M Essam Hamed
2025-09-01 15:13:13 +03:00
parent c6328788ca
commit 762b9b7b56
5 changed files with 52 additions and 25 deletions
+2 -2
View File
@@ -182,8 +182,8 @@ func (s *BaseServer) Start(ctx context.Context) error {
s.update = version.NewUpdate("nb/management")
s.update.SetDaemonVersion(version.NetbirdVersion())
s.update.SetOnUpdateListener(func(newVersion string) {
log.WithContext(ctx).Infof("your management version, \"%s\", is outdated, a new management version (%s) is available. Learn more here: https://github.com/netbirdio/netbird/releases", version.NetbirdVersion(), newVersion)
s.update.SetOnUpdateListener(func() {
log.WithContext(ctx).Infof("your management version, \"%s\", is outdated, a new management version is available. Learn more here: https://github.com/netbirdio/netbird/releases", version.NetbirdVersion())
})
return nil