diff --git a/consul/server_details/server_details_internal_test.go b/consul/server_details/server_details_internal_test.go index 4028fe88cc..ee09d8f57f 100644 --- a/consul/server_details/server_details_internal_test.go +++ b/consul/server_details/server_details_internal_test.go @@ -12,7 +12,7 @@ func TestServerDetails_Key_Equal(t *testing.T) { equal bool }{ { - name: "IPv4 equality", + name: "Key equality", k1: &Key{ name: "s1", }, @@ -22,7 +22,7 @@ func TestServerDetails_Key_Equal(t *testing.T) { equal: true, }, { - name: "IPv4 Inequality", + name: "Key Inequality", k1: &Key{ name: "s1", }, diff --git a/consul/server_manager/server_manager.go b/consul/server_manager/server_manager.go index 21ff8c76ba..6ae73e0509 100644 --- a/consul/server_manager/server_manager.go +++ b/consul/server_manager/server_manager.go @@ -53,9 +53,9 @@ type ConsulClusterInfo interface { NumNodes() int } -// ConnPoolTester is an interface wrapping client.ConnPool to prevent a +// Pinger is an interface wrapping client.ConnPool to prevent a // cyclic import dependency -type ConnPoolPinger interface { +type Pinger interface { PingConsulServer(server *server_details.ServerDetails) (bool, error) } @@ -90,9 +90,9 @@ type ServerManager struct { clusterInfo ConsulClusterInfo // connPoolPinger is used to test the health of a server in the - // connection pool. ConnPoolPinger is an interface that wraps + // connection pool. Pinger is an interface that wraps // client.ConnPool. - connPoolPinger ConnPoolPinger + connPoolPinger Pinger // notifyFailedBarrier is acts as a barrier to prevent queuing behind // serverConfigLog and acts as a TryLock(). @@ -220,7 +220,7 @@ func (sm *ServerManager) saveServerConfig(sc serverConfig) { } // New is the only way to safely create a new ServerManager struct. -func New(logger *log.Logger, shutdownCh chan struct{}, clusterInfo ConsulClusterInfo, connPoolPinger ConnPoolPinger) (sm *ServerManager) { +func New(logger *log.Logger, shutdownCh chan struct{}, clusterInfo ConsulClusterInfo, connPoolPinger Pinger) (sm *ServerManager) { sm = new(ServerManager) sm.logger = logger sm.clusterInfo = clusterInfo // can't pass *consul.Client: import cycle