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 01f8e469aa
commit edb408bc22
1 changed files with 3 additions and 1 deletions

View File

@ -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.