(compose-rid cluster-id record-position)
Given a cluster-id and a record-position returns a RID in string format.
Given a cluster-id and a record-position returns a RID in string format.
(decode in spec)
Decode the data stream in
according to spec
.
Decode the data stream `in` according to `spec`.
(defcommand command-name args request-handler response-handler)
Create a function named command-name
that accepts the argument specified
in args
. request-handler
and response-handler
must be functions. e.g.:
(defcommand test [arg-1 arg-2] request-handler-fn response-handler-fn)
Create a function named `command-name` that accepts the argument specified in `args`. `request-handler` and `response-handler` must be functions. e.g.: (defcommand test [arg-1 arg-2] request-handler-fn response-handler-fn)
(defconnection command-name args request-handler response-handler service)
Create a function named command-name
that accepts the argument specified
in args
. request-handler
and response-handler
must be functions.
service
is a keyword which indicates the service to which the connection
applies. e.g.:
(defconnection test [arg-1 arg-2] request-handler-fn response-handler-fn :db)
Create a function named `command-name` that accepts the argument specified in `args`. `request-handler` and `response-handler` must be functions. `service` is a keyword which indicates the service to which the connection applies. e.g.: (defconnection test [arg-1 arg-2] request-handler-fn response-handler-fn :db)
(encode spec message)
Encode message
applying for each of its fields the function specified in
spec.
Encode `message` applying for each of its fields the function specified in `spec.`
(parse-rid rid)
Parse a RID in string format and returns a vector with cluster-id and record-position.
Parse a RID in string format and returns a vector with cluster-id and record-position.
(take-upto pred)
(take-upto pred coll)
Returns a lazy sequence of successive items from coll up to and including
the first item for which (pred item)
returns true.
Returns a lazy sequence of successive items from coll up to and including the first item for which `(pred item)` returns true.
(valid-message? spec message)
Validate message
against spec
.
Validate `message` against `spec`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close