Dynamic variable what keep the state of processed
:registry value from status-map
Dynamic variable what keep the state of processed `:registry` value from `status-map`
Dynamic configuration for commando/execute behavior.
Bound automatically by commando.core/execute — prefer passing config
via the opts map to execute rather than binding directly.
:error-data-string (boolean): When true, the :data key in
serialized ExceptionInfo (via commando.impl.utils/serialize-exception)
will be a string representation of the data. When false, it will return
the original map structure.:hook-execute-start (fn [status-map]): if not nil, can run procedure
passed in value.:hook-execute-end (fn [status-map]): if not nil, can run procedure
passed in value.Example (commando.core/execute [commando.commands.builtin/command-from-spec] {"1" 1 "2" {:commando/from ["1"]} "3" {:commando/from ["2"]}} {:error-data-string false :hook-execute-start (fn [e] (println (:uuid e))) :hook-execute-end (fn [e] (println (:uuid e) (:stats e)))})
Dynamic configuration for `commando/execute` behavior.
Bound automatically by `commando.core/execute` — prefer passing config
via the opts map to `execute` rather than binding directly.
- `:error-data-string` (boolean): When true, the `:data` key in
serialized `ExceptionInfo` (via `commando.impl.utils/serialize-exception`)
will be a string representation of the data. When false, it will return
the original map structure.
- `:hook-execute-start` (fn [status-map]): if not nil, can run procedure
passed in value.
- `:hook-execute-end` (fn [status-map]): if not nil, can run procedure
passed in value.
Example
(commando.core/execute
[commando.commands.builtin/command-from-spec]
{"1" 1
"2" {:commando/from ["1"]}
"3" {:commando/from ["2"]}}
{:error-data-string false
:hook-execute-start (fn [e] (println (:uuid e)))
:hook-execute-end (fn [e] (println (:uuid e) (:stats e)))})Dynamic variable to keep context information about the execution setup.
:uuid the unique name of execution, generated everytime the user
invoke commando.core/execute:stack in case of user use commando.commands.builtin/command-macro-spec,
or commando.commands.query-dsl/command-resolve-spec or any sort of
commands what invoking commando.core/execute inside of parent instruction
by simulation recursive call, the :stack key will store the invocation stack
in vector of :uuidsDynamic variable to keep context information about the execution setup. - `:uuid` the unique name of execution, generated everytime the user invoke `commando.core/execute` - `:stack` in case of user use `commando.commands.builtin/command-macro-spec`, or `commando.commands.query-dsl/command-resolve-spec` or any sort of commands what invoking `commando.core/execute` inside of parent instruction by simulation recursive call, the :stack key will store the invocation stack in vector of :uuids
(-execute-internals-push uuid-execute-identifier)Update execute-internals structure
Update *execute-internals* structure
(command-map-spec-registry)Return :registry value in dynamic scoupe.
Required to run commando.core/execute inside
of parent execute invocation.
See
commando.core/execute
commando.core/execute-commands!(binding)
Return `:registry` value in dynamic scoupe. Required to run `commando.core/execute` inside of parent execute invocation. See `commando.core/execute` `commando.core/execute-commands!`(binding)
(execute-config)Returns the effective configuration for commando/execute.
Inside execute — returns the bound *execute-config*.
Outside — returns defaults.
Returns the effective configuration for `commando/execute`. Inside `execute` — returns the bound `*execute-config*`. Outside — returns defaults.
(execute-config-update opts)Merges config-relevant keys from opts into the current
effective config. Non-config keys (e.g. :previous) are ignored.
Merges config-relevant keys from `opts` into the current effective config. Non-config keys (e.g. `:previous`) are ignored.
(format-time t)Formats a time t in nanoseconds to a string with units (ns, µs, ms, or s).
Formats a time `t` in nanoseconds to a string with units (ns, µs, ms, or s).
(hook-process status-map hook)Function will handle a hooks passed from users. Available hooks:
:hook-execute-start,:hook-execute-end.Read more:
commando.impl.utils/*execute-config*
Function will handle a hooks passed from users. Available hooks: - `:hook-execute-start`, - `:hook-execute-end`. Read more: `commando.impl.utils/*execute-config*`
Defines a single step in a driver pipeline or a standalone driver invocation.
Defines a single step in a driver pipeline or a standalone driver invocation.
(now)Returns a high-resolution timestamp in nanoseconds.
Returns a high-resolution timestamp in nanoseconds.
(resolve-fn x)Normalize x to a function (fn? x) => true.
:clj supports fn?/Var/Symbol (with requiring-resolve fallback). :cljs only accepts actual functions
Normalize `x` to a function (fn? x) => true.
- Fn((fn [] ..),:keyword)
- Vars(#'clojure.core/str, #'str),
- Symbols('clojure.core/str, 'str)
:clj supports fn?/Var/Symbol (with requiring-resolve fallback).
:cljs only accepts actual functions(serialize-exception e)Serializes errors into data structures.
Serializes errors into data structures.
Multimethod for serializing exceptions to maps. Dispatch based on exception class To add custom serialization for your exception type:
Example (defmethod serialize-exception-fn ClassOfException [e] {:type "my-exception" :message (.getMessage e) ...})
See
commando.impl.utils/serialize-exception
Multimethod for serializing exceptions to maps.
Dispatch based on exception class
To add custom serialization for your exception type:
Example
(defmethod serialize-exception-fn ClassOfException [e]
{:type "my-exception"
:message (.getMessage e)
...})
See
`commando.impl.utils/serialize-exception`Multimethod for serializing exceptions to maps. dispatch differentiate two type of exception. Not supposed to be extended in cljs
See
commando.impl.utils/serialize-exception
Multimethod for serializing exceptions to maps. dispatch differentiate two type of exception. Not supposed to be extended in cljs See `commando.impl.utils/serialize-exception`
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 |