Liking cljdoc? Tell your friends :D

taoensso.carmine.protocol

Core facilities for communicating with Redis servers using the Redis request/response protocol, Ref. http://redis.io/topics/protocol.

Core facilities for communicating with Redis servers using the Redis
request/response protocol, Ref. http://redis.io/topics/protocol.
raw docstring

*context*clj

Current dynamic Context

Current dynamic Context
sourceraw docstring

*nested-stash-consumed?_*clj

source

*nested-stashed-reqs*clj

source

*parser*clj

ifn (with optional meta) or nil

ifn (with optional meta) or nil
sourceraw docstring

-with-repliesclj

(-with-replies body-fn as-pipeline?)

Implementation detail

Implementation detail
sourceraw docstring

execute-requestsclj

(execute-requests get-replies? as-pipeline?)
(execute-requests conn requests get-replies? as-pipeline?)

Implementation detail. Sends given/dynamic requests to given/dynamic Redis server and optionally blocks to receive the relevant queued (pipelined) parsed replies.

Implementation detail.
Sends given/dynamic requests to given/dynamic Redis server and optionally
blocks to receive the relevant queued (pipelined) parsed replies.
sourceraw docstring

get-parsed-replyclj

(get-parsed-reply in ?parser)

Implementation detail

Implementation detail
sourceraw docstring

get-unparsed-replyclj

(get-unparsed-reply in req-opts)

Implementation detail. BLOCKS to receive a single reply from Redis server and returns the result as [<type> <reply>]. Redis will reply to commands with different kinds of replies, identified by their first byte, Ref. http://redis.io/topics/protocol:

  • + for simple strings -> <string>
  • : for integers -> <long>
  • - for error strings -> <ex-info>
  • $ for bulk strings -> <clj>/<raw-bytes> ; Marked as serialized -> <bytes>/<raw-bytes> ; Marked as binary -> <string>/<raw-bytes> ; Unmarked -> nil
  • * for arrays -> <vector> -> nil
Implementation detail.
BLOCKS to receive a single reply from Redis server and returns the result as
[<type> <reply>]. Redis will reply to commands with different kinds of replies,
identified by their first byte, Ref. http://redis.io/topics/protocol:

  * `+` for simple strings -> <string>
  * `:` for integers       -> <long>
  * `-` for error strings  -> <ex-info>
  * `$` for bulk strings   -> <clj>/<raw-bytes>    ; Marked as serialized
                           -> <bytes>/<raw-bytes>  ; Marked as binary
                           -> <string>/<raw-bytes> ; Unmarked
                           -> nil
  * `*` for arrays         -> <vector>
                           -> nil
sourceraw docstring

IByteStrcljprotocol

byte-strclj

(byte-str x)

Coerces arbitrary Clojure val to Redis bytestring

Coerces arbitrary Clojure val to Redis bytestring
source

no-context-exclj

source

parsecljmacro

(parse f & body)

Wraps body so that replies to any wrapped Redis commands will be parsed with (f reply). Replaces any current parser; removes parser when f is nil. See also parser-comp.

Wraps body so that replies to any wrapped Redis commands will be parsed with
`(f reply)`. Replaces any current parser; removes parser when `f` is nil.
See also `parser-comp`.
sourceraw docstring

parse-nippycljmacro

(parse-nippy thaw-opts & body)
source

parse-rawcljmacro

(parse-raw & body)
source

parser-compclj

(parser-comp f g)

Composes parsers when f or g are nnil, preserving metadata

Composes parsers when f or g are nnil, preserving metadata
sourceraw docstring

rawclj

(raw x)

Forces byte[] argument to be sent to Redis as raw, unencoded bytes.

Forces byte[] argument to be sent to Redis as raw, unencoded bytes.
sourceraw docstring

returnclj

Takes values and returns them as part of next reply from Redis server. Unlike echo, does not actually send any data to Redis.

Takes values and returns them as part of next reply from Redis server.
Unlike `echo`, does not actually send any data to Redis.
sourceraw docstring

return-parsed-repliesclj

(return-parsed-replies preplies as-pipeline?)

Implementation detail

Implementation detail
sourceraw docstring

suppressed-reply-kwclj

source

with-contextcljmacro

(with-context conn & body)

Implementation detail

Implementation detail
sourceraw docstring

with-repliescljmacro

(with-replies & body)
(with-replies :as-pipeline & body)

Alpha - subject to change. Evaluates body, immediately returning the server's response to any contained Redis commands (i.e. before enclosing context ends).

As an implementation detail, stashes and then returns any replies already queued with Redis server: i.e. should be compatible with pipelining.

Note on parsers: if you're writing a Redis command (e.g. a fn that is intended to execute w/in an implicit connection context) and you're using with-replies as an implementation detail (i.e. you're interpreting replies internally), you probably want (parse nil (with-replies ...)) to keep external parsers from leaking into your internal logic.

Alpha - subject to change.
Evaluates body, immediately returning the server's response to any
contained Redis commands (i.e. before enclosing context ends).

As an implementation detail, stashes and then `return`s any replies already
queued with Redis server: i.e. should be compatible with pipelining.

Note on parsers: if you're writing a Redis command (e.g. a fn that is
intended to execute w/in an implicit connection context) and you're using
`with-replies` as an implementation detail (i.e. you're interpreting
replies internally), you probably want `(parse nil (with-replies ...))` to
keep external parsers from leaking into your internal logic.
sourceraw docstring

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

× close