Files
pluto/docs/concepts/Registry.md
jhe 73899afb30 Implementing queries/events-#8
Fix optional `:view` prop resolution

Add permission object implementation

Platform exposed events & queries

Refresh doc

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
2018-08-28 14:43:09 +02:00

1.1 KiB

title, sidebar_label
title sidebar_label
Registry Registry

Registry allows to manage a set of extensions, which are expected to live under [:registry] path in app state. Using registry a host can add/delete/activate/deactivate extensions uniformly and all extension hooks will hook-in/unhook into/from host automatically.

(registry/add extension coeffects-map) ;; returns new effects map with extension added

Extensions id are unique. Hooks defined in extensions also must have global unique ids.

Once in a registry an extension is inactive. It can be either active or inactive.

(registry/deactivate extension-id coeffect-map) ;; returns new effects map with extension deactivated
(registry/activate extension-id coeffects-map) ;; returns new effects map with extension activated

When extension is deleted, all the hooks are deactivated (unhooked from the host) automatically, if it was in the active state before.

(registry/delete extension-id coeffects-map) ;; returns new effects map with extension deleted and (potential) unhook effects