             [clojurewerkz.elastisch.rest.document :as esrd]
             [clojure.tools.logging :as log]
             [whisper2cyanite.logging :as wlog]))
+
+(defprotocol PathStore
+  (insert [this tenant path])
+  (exist? [this tenant path])
+  (shutdown [this]))
 
 (def ^:const default-es-index "cyanite_paths")
 (def ^:const es-def-type "path")

                :properties {:tenant {:type "string" :index "not_analyzed"}
                             :path {:type "string" :index "not_analyzed"}}}})

(defn get-all-paths
  "Get all paths."
  [tenant path]
  (let [parts (str/split path #"\.")

            :leaf (= depth parts-count)})
         (range 1 (inc parts-count)))))

(defn- constuct-id
  "Construct ID."
  [path tenant]
  (str path "_" tenant))

(defn elasticsearch-metric-store
  "Elasticsearch path store."
