State tracker for client sessions.
State tracker for client sessions.
(calculate-changed-project-state new-project-state old-project-state)
Return a map of namespaces that changed between new-project-state and old-project-state. New and old state maps from namespace symbols to namespace state, which is the same format of map returned by this function.
Return a map of namespaces that changed between new-project-state and old-project-state. New and old state maps from namespace symbols to namespace state, which is the same format of map returned by this function.
(calculate-changed-project-state-response {:keys [session] :as msg})
Calculate changes in project state since we lasst notified the client. Response is a map:
:repl-type
- either :clj
or :cljs
:changed-namespaces
- a map of namespaces that have changedThe previous value of project-state is taken from the session metadata. Once the new value is computed, it has to be written into the session metadata. Also take 'real metadata cache' from the session metadata (it is mutable).
Calculate changes in project state since we lasst notified the client. Response is a map: - `:repl-type` - either `:clj` or `:cljs` - `:changed-namespaces` - a map of namespaces that have changed The previous value of project-state is taken from the session metadata. Once the new value is computed, it has to be written into the session metadata. Also take 'real metadata cache' from the session metadata (it is mutable).
(make-transport {:keys [transport session] :as msg})
Return a Transport that defers to transport
and possibly notifies
about the state.
Return a Transport that defers to `transport` and possibly notifies about the state.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close