slacker.client
call-remote
(call-remote sc remote-ns remote-fn args & {:keys [async? callback extensions], :as options})
call a remote function by its namespace and function name, without a local defn-remote
reference.
sc
the slacker clientremote-ns
remote namespace, stringremote-fn
remote function name, stringargs
arguments, vec:async? true
make this a async function, returns a manifold deferred:callback (fn [r e] )
set a callback for this async function:extensions {}
add extension data for the function call
defn-remote
macro
(defn-remote sc fname & {:keys [remote-ns remote-name async? fire-and-forget? callback extensions], :or {remote-ns (ns-name *ns*), remote-name nil, async? false, fire-and-forget? false, callback nil}, :as options})
Define a facade for remote function. You have to provide the connection and the function name. (Argument list is not required here.)
shutdown-slacker-client-factory
(shutdown-slacker-client-factory)
(shutdown-slacker-client-factory factory)
Shutdown a client factory, close all clients derived from it.
slacker-client-factory
(slacker-client-factory ssl-context)
Create a secure client factory from ssl-connect
slacker-server-status
(slacker-server-status sc)
Fetch server status of current slacker server.
slackerc
(slackerc addr & {:keys [content-type factory ping-interval timeout backlog interrupt-on-timeout interceptors callback-executor protocol-version], :or {content-type :clj, interceptors interceptor/default-interceptors}})
Create connection to a slacker server.
use-remote
(use-remote sc-sym)
(use-remote sc-sym rns)
(use-remote sc-sym rns lns & {:keys [only exclude], :or {only [], exclude []}})
import remote functions the current namespace, this function will generate remote call, use it carefully in a declarative style.
with-callback
macro
(with-callback & body)
call the slacker remote function with a custom callback, and make the function an async one
with-slackerc
macro
(with-slackerc sc & body)
call the slacker remote function with a client other than the client used to declare the function