Command contributions to a composite tool.
An addon contributes named subcommands to a host tool, so
analysis command="lint ..." reaches the contributing addon's handler.
Each contribution records the contributing addon so shutdown can retract
everything that addon added.
Shape: {tool-name {command-name {:handler fn :params {} :description str :addon addon-id}}}
Command contributions to a composite tool.
An addon contributes named subcommands to a host tool, so
`analysis command="lint ..."` reaches the contributing addon's handler.
Each contribution records the contributing addon so shutdown can retract
everything that addon added.
Shape: {tool-name {command-name {:handler fn :params {} :description str
:addon addon-id}}}Opaque capability registry.
An addon registers an implementation under a keyword key at startup; a consumer looks it up without knowing which addon provides it:
(register! :gs/struct-cmp my-cmp-fn)
(if-let [f (get-extension :gs/struct-cmp)] (f a b) fallback)
Registration is atomic and idempotent — re-registering a key replaces it.
Opaque capability registry.
An addon registers an implementation under a keyword key at startup; a
consumer looks it up without knowing which addon provides it:
(register! :gs/struct-cmp my-cmp-fn)
(if-let [f (get-extension :gs/struct-cmp)]
(f a b)
fallback)
Registration is atomic and idempotent — re-registering a key replaces it.Schema-property extensions contributed to a host tool.
An addon widens an existing tool's input schema by registering extra properties under that tool's name. Contributions merge, so several addons may extend the same tool.
Schema-property extensions contributed to a host tool. An addon widens an existing tool's input schema by registering extra properties under that tool's name. Contributions merge, so several addons may extend the same tool.
Dynamically registered tool definitions.
A tool definition is a map carrying at least a :name string and a :handler fn. Registration is keyed by :name, last write wins.
Dynamically registered tool definitions. A tool definition is a map carrying at least a :name string and a :handler fn. Registration is keyed by :name, last write wins.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |