Commit 884a2e05 authored by Harshit Pande's avatar Harshit Pande

global cluster_config no more needed in raft and neither GetClusterConfig()...

global cluster_config no more needed in raft and neither GetClusterConfig() function, cluster config only in raft object
parent 7c0f5544
......@@ -87,12 +87,6 @@ type Reply struct {
// Structure for registering RPC methods
type AppendEntries struct{}
var cluster_config *ClusterConfig
func GetClusterConfig() *ClusterConfig {
return cluster_config
}
// Creates a raft object. This implements the SharedLog interface.
// commitCh is the channel that the kvstore waits on for committed messages.
// When the process starts, the local disk log is read and all committed
......@@ -101,7 +95,6 @@ func NewRaft(config *ClusterConfig, thisServerId int, commitCh chan LogEntry, lo
rft := new(Raft)
rft.commitCh = commitCh
rft.clusterConfig = config
cluster_config = config
rft.id = thisServerId
Info = logger
lsn = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment