mirror of
https://github.com/MirageNetwork/MirageServer.git
synced 2025-10-11 11:10:42 +08:00
调整与受管司南之间通知可信节点变化的为控制器向司南发请求推送差值;需要考虑的问题是控制器下线后重新上线如何通知受管司南拉拉取最新信息?(是否有必要?)
Signed-off-by: Chenyang Gao <gps949@outlook.com>
This commit is contained in:
@@ -360,6 +360,8 @@ func (h *Mirage) handleAuthKeyCommon(
|
||||
Str("machine", machine.Hostname).
|
||||
Msg("machine was already registered before, refreshing with new auth key")
|
||||
|
||||
h.NotifyNaviOrgNodesChange(machine.User.OrganizationID, nodeKey, machine.NodeKey)
|
||||
|
||||
machine.NodeKey = nodeKey
|
||||
machine.AuthKeyID = uint(pak.ID)
|
||||
machine.AuthKey = pak
|
||||
@@ -429,6 +431,7 @@ func (h *Mirage) handleAuthKeyCommon(
|
||||
|
||||
return
|
||||
}
|
||||
h.NotifyNaviOrgNodesChange(machine.User.OrganizationID, nodeKey, "")
|
||||
}
|
||||
|
||||
err = h.UsePreAuthKey(pak)
|
||||
@@ -539,6 +542,8 @@ func (h *Mirage) handleMachineLogOutCommon(
|
||||
return
|
||||
}
|
||||
|
||||
h.NotifyNaviOrgNodesChange(machine.User.OrganizationID, "", machine.NodeKey)
|
||||
|
||||
log.Info().
|
||||
Caller().
|
||||
Str("machine", machine.Hostname).
|
||||
|
Reference in New Issue
Block a user