Use config struct to create NetworkTransport layer when setting up raft

This commit is contained in:
Preetha Appan 2017-08-23 14:54:10 -05:00
parent 393ce1581b
commit c68fce89b5
1 changed files with 3 additions and 1 deletions

View File

@ -494,7 +494,9 @@ func (s *Server) setupRaft() error {
}
// 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
// Make sure we set the LogOutput.