|
@@ -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)
|