From 2aebb957b34c60cb79f454a77b8433bde9bfcbb4 Mon Sep 17 00:00:00 2001 From: Max Penet Date: Sat, 7 Oct 2023 09:40:22 +0200 Subject: [PATCH] move files out of ./clj --- deps.edn | 2 +- src/{clj => }/qbits/spandex.clj | 48 +++++++++---------- .../qbits/spandex/client_options.clj | 0 .../qbits/spandex/sniffer_options.clj | 0 src/{clj => }/qbits/spandex/spec.clj | 0 src/{clj => }/qbits/spandex/url.clj | 0 src/{clj => }/qbits/spandex/utils.clj | 0 7 files changed, 24 insertions(+), 26 deletions(-) rename src/{clj => }/qbits/spandex.clj (98%) rename src/{clj => }/qbits/spandex/client_options.clj (100%) rename src/{clj => }/qbits/spandex/sniffer_options.clj (100%) rename src/{clj => }/qbits/spandex/spec.clj (100%) rename src/{clj => }/qbits/spandex/url.clj (100%) rename src/{clj => }/qbits/spandex/utils.clj (100%) diff --git a/deps.edn b/deps.edn index 635cb69..e24698f 100644 --- a/deps.edn +++ b/deps.edn @@ -14,7 +14,7 @@ cheshire/cheshire {:mvn/version "5.11.0"} ring/ring-codec {:mvn/version "1.1.2"}} - :paths ["src/clj"] + :paths ["src"] :aliases {:test {:extra-paths ["test"] diff --git a/src/clj/qbits/spandex.clj b/src/qbits/spandex.clj similarity index 98% rename from src/clj/qbits/spandex.clj rename to src/qbits/spandex.clj index 9c7025f..b80ec8e 100644 --- a/src/clj/qbits/spandex.clj +++ b/src/qbits/spandex.clj @@ -1,19 +1,25 @@ (ns qbits.spandex (:require + [cheshire.core :as json] [clojure.core.async :as async] + [clojure.java.io :as io] + [clojure.string :as str] + [qbits.commons.enum :as enum] [qbits.spandex.client-options :as client-options] [qbits.spandex.sniffer-options :as sniffer-options] - [qbits.commons.enum :as enum] - [qbits.spandex.url :as url] - [cheshire.core :as json] - [clojure.string :as str] - [clojure.java.io :as io]) + [qbits.spandex.url :as url]) (:import - (org.elasticsearch.client.sniff - Sniffer - ElasticsearchNodesSniffer - ElasticsearchNodesSniffer$Scheme - SniffOnFailureListener) + (java.nio.charset + StandardCharsets) + (java.util.zip + GZIPInputStream) + (org.apache.http + Header + HttpEntity) + (org.apache.http.entity + InputStreamEntity) + (org.apache.http.nio.entity + NStringEntity) (org.elasticsearch.client NodeSelector Request @@ -23,19 +29,11 @@ ResponseListener HttpAsyncResponseConsumerFactory ResponseException) - (org.apache.http - Header - HttpEntity) - (org.apache.http.message - BasicHeader) - (org.apache.http.nio.entity - NStringEntity) - (org.apache.http.entity - InputStreamEntity) - (java.nio.charset - StandardCharsets) - (java.util.zip - GZIPInputStream))) + (org.elasticsearch.client.sniff + Sniffer + ElasticsearchNodesSniffer + ElasticsearchNodesSniffer$Scheme + SniffOnFailureListener))) (defn client "Returns a client instance to be used to perform requests. @@ -496,8 +494,8 @@ #(request-chan client (build-map request-map %)) max-concurrent-requests) (async/go-loop - [payload [] - timeout-ch (async/timeout flush-interval)] + [payload [] + timeout-ch (async/timeout flush-interval)] (let [[chunk ch] (async/alts! [flush-ch timeout-ch input-ch])] (cond (#{flush-ch timeout-ch} ch) diff --git a/src/clj/qbits/spandex/client_options.clj b/src/qbits/spandex/client_options.clj similarity index 100% rename from src/clj/qbits/spandex/client_options.clj rename to src/qbits/spandex/client_options.clj diff --git a/src/clj/qbits/spandex/sniffer_options.clj b/src/qbits/spandex/sniffer_options.clj similarity index 100% rename from src/clj/qbits/spandex/sniffer_options.clj rename to src/qbits/spandex/sniffer_options.clj diff --git a/src/clj/qbits/spandex/spec.clj b/src/qbits/spandex/spec.clj similarity index 100% rename from src/clj/qbits/spandex/spec.clj rename to src/qbits/spandex/spec.clj diff --git a/src/clj/qbits/spandex/url.clj b/src/qbits/spandex/url.clj similarity index 100% rename from src/clj/qbits/spandex/url.clj rename to src/qbits/spandex/url.clj diff --git a/src/clj/qbits/spandex/utils.clj b/src/qbits/spandex/utils.clj similarity index 100% rename from src/clj/qbits/spandex/utils.clj rename to src/qbits/spandex/utils.clj