Removed RaftBindPort config. Raft bind address and port are dynamically assigned on startup instead of configured manually. Replaced memberlist-port configuration with discovery-port.

This commit is contained in:
Kelvin Mwinuka
2024-06-20 04:20:31 +08:00
parent 75baaa5c47
commit 9b0d590171
9 changed files with 129 additions and 140 deletions

View File

@@ -33,15 +33,6 @@ func main() {
ctx := context.WithValue(context.Background(), internal.ContextServerID("ServerID"), conf.ServerID)
// Default BindAddr if it's not specified
if conf.BindAddr == "" {
if addr, err := internal.GetIPAddress(); err != nil {
log.Fatal(err)
} else {
conf.BindAddr = addr
}
}
cancelCh := make(chan os.Signal, 1)
signal.Notify(cancelCh, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)