mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-14 09:04:44 +08:00
add switch case statements to host updates mq handler
This commit is contained in:
parent
5f65f84b79
commit
652ef642bd
1 changed files with 6 additions and 1 deletions
|
@ -142,8 +142,13 @@ func UpdateHost(client mqtt.Client, msg mqtt.Message) {
|
|||
return
|
||||
}
|
||||
logger.Log(0, fmt.Sprintf("recieved host update: %+v\n", hostUpdate))
|
||||
// TODO: logic for host update recieved from client, handle both `update` and `delete` action here.
|
||||
switch hostUpdate.Action {
|
||||
case models.UpdateHost:
|
||||
// TODO: logic to update host recieved from client
|
||||
case models.DeleteHost:
|
||||
// TODO: logic to delete host on the server
|
||||
|
||||
}
|
||||
// if servercfg.Is_EE && ifaceDelta {
|
||||
// if err = logic.EnterpriseResetAllPeersFailovers(currentHost.ID.String(), currentHost.Network); err != nil {
|
||||
// logger.Log(1, "failed to reset failover list during node update", currentHost.ID.String(), currentHost.Network)
|
||||
|
|
Loading…
Add table
Reference in a new issue