This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// Build and run as root since this code uses iptables to emulate a network outage. | |
// Make sure rules in iptables are cleared: | |
// sudo iptables -D INPUT -j DROP -p tcp --destination-port 2379; sudo iptables -D INPUT -j DROP -p tcp --source-port 2379 | |
import ( | |
"context" | |
"log" |