Liking cljdoc? Tell your friends :D

commando.impl.utils


*command-map-spec-registry*clj/s

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`
sourceraw docstring

*execute-config*clj/s

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)))})
sourceraw docstring

*execute-internals*clj/s

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 :uuids
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 :uuids
sourceraw docstring

-execute-internals-pushclj/s

(-execute-internals-push uuid-execute-identifier)

Update execute-internals structure

Update *execute-internals* structure
sourceraw docstring

command-map-spec-registryclj/s

(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)
sourceraw docstring

exception-dispatch-fnclj

(exception-dispatch-fn e)
source

exception-message-headerclj/s

source

execute-configclj/s

(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.
sourceraw docstring

execute-config-updateclj/s

(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.
sourceraw docstring

format-timeclj/s

(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).
sourceraw docstring

hook-processclj/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*`
sourceraw docstring

malli:driver-specclj/s

source

malli:driver-step-specclj/s

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.
sourceraw docstring

nowclj/s

(now)

Returns a high-resolution timestamp in nanoseconds.

Returns a high-resolution timestamp in nanoseconds.
sourceraw docstring

resolvable-fn?clj/s

(resolvable-fn? x)
source

ResolvableFnclj/s

source

resolve-fnclj/s

(resolve-fn x)

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

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
sourceraw docstring

serialize-exceptionclj/s

(serialize-exception e)

Serializes errors into data structures.

Serializes errors into data structures.
sourceraw docstring

serialize-exception-fnclj/s≠multimethod

clj

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`
cljs

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`
source (clj)source (cljs)raw docstring

stacktrace->vec-strclj

(stacktrace->vec-str t)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close