func (s *RaftServer) sendHeartbeatToServer(req *raftrpc.AppendRPCRequest, followerAddr *net.TCPAddr) {
	countlog.Info(fmt.Sprintf("%s sendHeartbeat to %s", s, followerAddr))
	client, err := s.clientPool.Get(followerAddr)
	if err != nil {
		countlog.Error("Connect Error", "error", err, "followerAddr", followerAddr.String())
		return
	}
	var resp raftrpc.AppendRPCResponse
	if err = client.Call("RaftService.OnReceiveAppendRPC", req, &resp); err != nil {
		countlog.Error("SendAppendEntryRPC Fail", "followerAddr", followerAddr.String(), "error", err.Error())
		return
	}
	countlog.Info(fmt.Sprintf("HeartbeatResponse from %s", followerAddr.String()))
	serverID, _ := s.ServerConf.FindIDByAddr(followerAddr.String())
	s.leaderState.LastRPCTime[serverID] = time.Now()
}
// sendHeartbeatToServer sends heart beat rpc to one server
sendHeartbeatToServer sends heart beat rpc to one server
// sendHeartbeatToServer sends heart beat rpc to one server
func (s *RaftServer) sendHeartbeatToServer(req *raftrpc.AppendRPCRequest, followerAddr *net.TCPAddr) {
	countlog.Info(fmt.Sprintf("%s sendHeartbeat to %s", s, followerAddr))
	client, err := s.clientPool.Get(followerAddr)
	if err != nil {
		countlog.Error("Connect Error", "error", err, "followerAddr", followerAddr.String())
		return
	}
	var resp raftrpc.AppendRPCResponse
	if err = client.Call("RaftService.OnReceiveAppendRPC", req, &resp); err != nil {
		countlog.Error("SendAppendEntryRPC Fail", "followerAddr", followerAddr.String(), "error", err.Error())
		return
	}
	countlog.Info(fmt.Sprintf("HeartbeatResponse from %s", followerAddr.String()))
	serverID, _ := s.ServerConf.FindIDByAddr(followerAddr.String())
	s.leaderState.LastRPCTime[serverID] = time.Now()
}
func ( s * RaftServer ) sendHeartbeatToServer ( req * raftrpc . AppendRPCRequest , followerAddr * net . TCPAddr ) { countlog . Info ( fmt . Sprintf ( " " , s , followerAddr ) ) client , err := s . clientPool . Get ( followerAddr ) if err != nil { countlog . Error ( " " , " " , err , " " , followerAddr . String ( ) ) return } var resp raftrpc . AppendRPCResponse if err = client . Call ( " " , req , & resp ) ; err != nil { countlog . Error ( " " , " " , followerAddr . String ( ) , " " , err . Error ( ) ) return } countlog . Info ( fmt . Sprintf ( " " , followerAddr . String ( ) ) ) serverID , _ := s . ServerConf . FindIDByAddr ( followerAddr . String ( ) ) s . leaderState . LastRPCTime [ serverID ] = time . Now ( ) }
sendHeartbeatToServer sends heart beat rpc to one server
sendHeartbeatToServer sends heart beat rpc to one server