fix error on run
This commit is contained in:
parent
b92d2c732b
commit
5660167495
2 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ func sendHeartbeats() {
|
||||||
}
|
}
|
||||||
for _, node := range peers {
|
for _, node := range peers {
|
||||||
msg := Message{
|
msg := Message{
|
||||||
ID: hostID.Pretty(),
|
ID: hostID,
|
||||||
Type: "heartbeat",
|
Type: "heartbeat",
|
||||||
Content: authCode,
|
Content: authCode,
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ func startElection() {
|
||||||
|
|
||||||
for _, node := range peers {
|
for _, node := range peers {
|
||||||
msg := Message{
|
msg := Message{
|
||||||
ID: hostID.Pretty(),
|
ID: hostID,
|
||||||
Type: "election",
|
Type: "election",
|
||||||
Content: authCode,
|
Content: authCode,
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ func nodeUpdateSync() {
|
||||||
for _, peerAddr := range peers {
|
for _, peerAddr := range peers {
|
||||||
fmt.Printf("Notifying node %s about update...\n", peerAddr)
|
fmt.Printf("Notifying node %s about update...\n", peerAddr)
|
||||||
msg := Message{
|
msg := Message{
|
||||||
ID: hostID.Pretty(),
|
ID: hostID,
|
||||||
Type: "update",
|
Type: "update",
|
||||||
Content: "Start update process",
|
Content: "Start update process",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue