Skip to content

Latest commit

 

History

History
113 lines (81 loc) · 3.16 KB

API.md

File metadata and controls

113 lines (81 loc) · 3.16 KB

clojure.data.alpha.replicant.server.prepl

datafy

(datafy v)

Remote API: Called by a replicant client to retrieve a datafy representation for an object v.
source

entry

(entry m k)
(entry
 m
 k
 {:keys [rds/lengths rds/level],
  :as depth-opts,
  :or {lengths server.spi/*remote-lengths*, level server.spi/*remote-depth*}})

Remote API: Called by a replicant client to retrieve a value mapped at key k for a collection m. Takes an object v and remotifies it if the :rds/lengths and :rds/level values cause a depth options threshold crossings. Expects a bound server.spi/rds-cache value.
source

fetch

(fetch v)
(fetch
 v
 {:keys [rds/lengths rds/level],
  :as depth-opts,
  :or {lengths server.spi/*remote-lengths*, level server.spi/*remote-depth*}})

Remote API: Called by a replicant client to retrieve an object from the cache. Takes an object v and remotifies it if the :rds/lengths and :rds/level values cause a depth options threshold crossings. Expects a bound server.spi/rds-cache value.
source

rds-prepl

(rds-prepl rds-cache)

Uses in and out streams to serve RDS data given an RDS cache.
source

remotify-proc

(remotify-proc val)

source

seq

(seq v)
(seq
 v
 {:keys [rds/lengths rds/level],
  :as depth-opts,
  :or {lengths server.spi/*remote-lengths*, level server.spi/*remote-depth*}})

Remote API: Called by a replicant client to retrieve a seq for a collection. Takes an object v and remotifies it if the :rds/lengths and :rds/level values cause a depth options threshold crossings. Expects a bound server.spi/rds-cache value.
source

start

(start)
(start & {:keys [port cache server-name], :or {port 5555, server-name "rds"}})

Local API: Starts a named Replicant server in the current process on a connected socket client thread. By default this function starts a server named "rds" listening on localhost:5555 and initializes a default Replicant cache. Callers may pass an options map with keys :server-name, :port, and :cache to override those defaults.
source

stop

(stop server-name)

Local API: Stops a named Replicant server in the current process. Stopping an active Replicant server closes all clients connected to it and clears its remote data cache.
source

string

(string v)

Remote API: Called by a replicant client to retrieve a string representation for an object v.
source