Use config struct to create NetworkTransport layer when setting up raft
This commit is contained in:
parent
01f8e469aa
commit
edb408bc22
|
@ -494,7 +494,9 @@ func (s *Server) setupRaft() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a transport layer.
|
// Create a transport layer.
|
||||||
trans := raft.NewNetworkTransportWithServerAddressProvider(s.raftLayer, 3, 10*time.Second, s)
|
transConfig := &raft.NetworkTransportConfig{Stream: s.raftLayer, MaxPool: 3, Timeout: 10 * time.Second, ServerAddressProvider: s}
|
||||||
|
|
||||||
|
trans := raft.NewNetworkTransportWithConfig(transConfig)
|
||||||
s.raftTransport = trans
|
s.raftTransport = trans
|
||||||
|
|
||||||
// Make sure we set the LogOutput.
|
// Make sure we set the LogOutput.
|
||||||
|
|
Loading…
Reference in New Issue