 (ns hellhound.components.cassandra
   "This namespace provides the necessary means to communicate with
   database."
-  (:require [environ.core                   :as environ]
-            [qbits.alia                     :as alia]
-            [qbits.hayt                     :as hayt]
-            [hellhound.components.protocols :as protocols]
-            [hellhound.logger.core          :as logger]
-            [hellhound.core                 :as hellhound]))
+  (:require
+   [clojure.spec.alpha             :as spec]
+   [environ.core                   :as environ]
+   [qbits.alia                     :as alia]
+   [qbits.hayt                     :as hayt]
+   ;; Internals
+   [hellhound.components.protocols :as protocols]
+   [hellhound.logger.core          :as logger]
+   [hellhound.core                 :as hellhound]))
 
 
-(defn- cassandra-config
+(spec/def ::cassanda-configuration
+  (spec/keys :req [::connection ::keyspace]))
+
+(defn cassandra-config
   []
   (:cassandra (:db (hellhound/application-config))))
 
 (defn- connect
-  ([]
-   (connect {}))
-  ([config]
-   (let [cluster (alia/cluster (:connecttion config))]
-     (alia/connect cluster))))
+  [config]
+  (let [cluster (alia/cluster (:connecttion config))]
+    (alia/connect cluster)))
 
 (defn- check-session
   [session name]

                               (:name keyspace-config)
                               (hayt/with (:details keyspace-config))))

        (assoc this :keyspace (:name keyspace-config))))))


(defn make-cassandra-client

      this))

  (setup [this]
    (let [session (:session this)]
      (check-session session "Cassandra")

      (let [keyspace-config (:keyspace (:options this))]
