(def- sym init)
Define a new private variable in 'defn-' style.
Define a new private variable in 'defn-' style.
(defprocedure sym named-args func)
Creates a new procedure that can be called through the JSON-RPC interface. The supplied function receives two arguments automatically - 'args', which is a vector of unnamed arguments (i.e. the caller supplied an Array), and 'notification', which is true when the function should not return anything. The named-args argument takes a vector of named arguments, and is used if the caller supplied a parameters Object. The names must be specified in the same order as they should appear in the unnamed arguments version.
Creates a new procedure that can be called through the JSON-RPC interface. The supplied function receives two arguments automatically - 'args', which is a vector of unnamed arguments (i.e. the caller supplied an Array), and 'notification', which is true when the function should not return anything. The named-args argument takes a vector of named arguments, and is used if the caller supplied a parameters Object. The names must be specified in the same order as they should appear in the unnamed arguments version.
(do-batch input)
Organises the execution of each entry in a batch, as well as the collation and return of the outputs of each entry. Enforces not returning anything if the call is a notification.
Organises the execution of each entry in a batch, as well as the collation and return of the outputs of each entry. Enforces not returning anything if the call is a notification.
(do-single input)
Very simply executes a single procedure call. Enforces not returning anything if the call is a notification.
Very simply executes a single procedure call. Enforces not returning anything if the call is a notification.
(error err)
(error code message)
Generates the return JSON for an error condition.
Generates the return JSON for an error condition.
(named-params call params id method)
Organises named parameters into a vector as if it were a positional parameter call, then calls the procedure as per normal.
Organises named parameters into a vector as if it were a positional parameter call, then calls the procedure as per normal.
(positional-params call params id method)
Just passes the vector of arguments to the procedure as-is.
Just passes the vector of arguments to the procedure as-is.
(respond result)
Generates the return JSON for a function's return value.
Generates the return JSON for a function's return value.
(start port)
(start port backlog)
(start port backlog bind-addr)
Creates a new asynchronous socket server with a given port, optional backlog (maximum queue length of incoming connection indications, 50 by default) and optional bind address (localhost by default), blocking the calling thread in the process. Use this server instead of the async server to prevent the main thread from exiting.
Creates a new asynchronous socket server with a given port, optional backlog (maximum queue length of incoming connection indications, 50 by default) and optional bind address (localhost by default), blocking the calling thread in the process. Use this server instead of the async server to prevent the main thread from exiting.
(start-async port)
(start-async port backlog)
(start-async port backlog bind-addr)
Creates a new asynchronous socket server with a given port, optional backlog (maximum queue length of incoming connection indications, 50 by default) and optional bind address (localhost by default), and returns immediately with a communications channel that can be used to command the server to shut down.
Creates a new asynchronous socket server with a given port, optional backlog (maximum queue length of incoming connection indications, 50 by default) and optional bind address (localhost by default), and returns immediately with a communications channel that can be used to command the server to shut down.
(when-valid call body)
Continues with body if the RPC call is valid. Otherwise, returns an appropriate error. body automatically receives the variables 'params', 'id' and 'method'
Continues with body if the RPC call is valid. Otherwise, returns an appropriate error. body automatically receives the variables 'params', 'id' and 'method'
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close