From f549c06764e29e9af8ff5a458c1d34dbd0a29f89 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Thu, 6 Jul 2017 09:09:21 -0500 Subject: [PATCH] Rename to raftNotifyCh, fix typo --- agent/consul/leader.go | 2 +- agent/consul/server.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/agent/consul/leader.go b/agent/consul/leader.go index e0c8af5488..2f42c5293b 100644 --- a/agent/consul/leader.go +++ b/agent/consul/leader.go @@ -36,7 +36,7 @@ func (s *Server) monitorLeadership() { // leaderCh, which is only notified best-effort. Doing this ensures // that we get all notifications in order, which is required for // cleanup and to ensure we never run multiple leader loops. - raftNotifyCh := s.raftNotifyChanel + raftNotifyCh := s.raftNotifyCh var wg sync.WaitGroup var stopCh chan struct{} diff --git a/agent/consul/server.go b/agent/consul/server.go index 64ea443f09..12d5f10bec 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -134,9 +134,9 @@ type Server struct { raftTransport *raft.NetworkTransport raftInmem *raft.InmemStore - // raftNotifyChanel set up by setupRaft() and ensures that we get reliable leader + // raftNotifyCh is set up by setupRaft() and ensures that we get reliable leader // transition notifications from the Raft layer. - raftNotifyChanel <-chan bool + raftNotifyCh <-chan bool // reconcileCh is used to pass events from the serf handler // into the leader manager, so that the strong state can be @@ -601,9 +601,9 @@ func (s *Server) setupRaft() error { } // Set up a channel for reliable leader notifications. - raftReconcileChannel := make(chan bool, 1) - s.config.RaftConfig.NotifyCh = raftReconcileChannel - s.raftNotifyChanel = raftReconcileChannel + raftNotifyCh := make(chan bool, 1) + s.config.RaftConfig.NotifyCh = raftNotifyCh + s.raftNotifyCh = raftNotifyCh // Setup the Raft store. s.raft, err = raft.NewRaft(s.config.RaftConfig, s.fsm, log, stable, snap, trans)