Liking cljdoc? Tell your friends :D

net.resp.connection


*close*clj


connectionclj

(connection {:keys [host port]})

creates a connection

(def |c| (connection {:host "localhost" :port 4456})) (connection? |c|) => true

(connection:close |c|)

creates a connection

(def |c| (connection {:host "localhost"
                      :port 4456}))
(connection? |c|)
=> true

(connection:close |c|)
raw docstring

connection-stringclj

(connection-string connection)

returns the string

returns the string
raw docstring

connection:closeclj

(connection:close connection)

closes the connection

closes the connection
raw docstring

connection:healthclj

(connection:health connection)

checks on the health of the connection

(connection:health |conn|) => {:status :ok}

checks on the health of the connection

(connection:health |conn|)
=> {:status :ok}
raw docstring

connection:infoclj

(connection:info connection)

outputs connection info

outputs connection info
raw docstring

connection:process-bulkclj

(connection:process-bulk connection inputs outputs _)

processes the returned responses

processes the returned responses
raw docstring

connection:process-singleclj

(connection:process-single _ data {:keys [format deserialize string]})

processes output data

processes output data
raw docstring

connection:readclj

(connection:read connection)

reads from the connection

reads from the connection
raw docstring

connection:request-bulkclj

(connection:request-bulk connection commands)
(connection:request-bulk connection commands _)

sends a multi command to the connection

sends a multi command to the connection
raw docstring

connection:request-singleclj

(connection:request-single connection command)
(connection:request-single connection command _)

requests the connection command

requests the connection command
raw docstring

connection:started?clj

(connection:started? connection)

checks that connection has started

checks that connection has started
raw docstring

connection:stopped?clj

(connection:stopped? connection)

checks that connection has stopped

checks that connection has stopped
raw docstring

connection:throwclj

(connection:throw connection t)

writes an exception to the connection

writes an exception to the connection
raw docstring

connection:transact-combineclj

(connection:transact-combine _ data)

not valid for rdp protocol

not valid for rdp protocol
raw docstring

connection:transact-endclj

(connection:transact-end connection)

command to end transaction

(connection:transact-end nil) => ["EXEC"]

command to end transaction

(connection:transact-end nil)
=> ["EXEC"]
raw docstring

connection:transact-startclj

(connection:transact-start connection)

command to start transaction

(connection:transact-start nil) => ["MULTI"]

command to start transaction

(connection:transact-start nil)
=> ["MULTI"]
raw docstring

connection:valueclj

(connection:value connection val)

writes a string value to the connection

writes a string value to the connection
raw docstring

connection:writeclj

(connection:write connection input)

writes to the connection

writes to the connection
raw docstring

connection?clj

(connection? obj)

checks if instance is type connection

(connection? |conn|) => true

checks if instance is type connection

(connection? |conn|)
=> true
raw docstring

input-arrayclj

(input-array command)

protects against wrong inputs

(seq (input-array [1 2 3])) => '("1" "2" "3")

protects against wrong inputs

(seq (input-array [1 2 3]))
=> '("1" "2" "3")
raw docstring

pipelineclj

(pipeline connection)

retrieves the connection pipeline

retrieves the connection pipeline
raw docstring

pipeline:readclj

(pipeline:read pipeline)

reads from the pipeline

reads from the pipeline
raw docstring

pipeline:writeclj

(pipeline:write pipeline input)

sends a request tot the pipeline

sends a request tot the pipeline
raw docstring

pipeline?clj

(pipeline? obj)

checks if object is instance of pipeline

checks if object is instance of pipeline
raw docstring

test:activateclj


test:configclj

(test:config)

creates a container and gets config

(test:config) => map?

creates a container and gets config

(test:config)
=> map?
raw docstring

test:connectionclj

(test:connection)
(test:connection m)

creates a test connection

(test:connection) => connection?

creates a test connection

(test:connection)
=> connection?
raw docstring

test:deactivateclj


with-connectioncljmacro

(with-connection [conn opts] & body)

creates a temporary connection and runs code

(with-connection [conn {:port 17000}] (cc/bulk conn (fn [] (cc/req conn ["FLUSHDB"]) (cc/req conn ["SET" "TEST:A" 1]) (cc/req conn ["KEYS" "*"])) {})) => ["OK" "OK" ["TEST:A"]]

creates a temporary connection and runs code

(with-connection [conn  {:port 17000}]
  (cc/bulk conn
          (fn []
            (cc/req conn ["FLUSHDB"])
            (cc/req conn ["SET" "TEST:A" 1])
            (cc/req conn ["KEYS" "*"]))
          {}))
=> ["OK" "OK" ["TEST:A"]]
raw docstring

with-test:connectioncljmacro

(with-test:connection conn & body)

creates an runs statements using a test connection

(with-connection [conn {:port 17000}] (cc/bulk conn (fn [] (cc/req conn ["FLUSHDB"]) (cc/req conn ["SET" "TEST:A" 1]) (cc/req conn ["KEYS" "*"])) {})) => ["OK" "OK" ["TEST:A"]]

creates an runs statements using a test connection

(with-connection [conn {:port 17000}]
  (cc/bulk conn
          (fn []
            (cc/req conn ["FLUSHDB"])
            (cc/req conn ["SET" "TEST:A" 1])
            (cc/req conn ["KEYS" "*"]))
          {}))
=> ["OK" "OK" ["TEST:A"]]
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close