mirror of
https://github.com/taoensso/telemere.git
synced 2026-01-27 08:40:35 +00:00
[doc] Update info on experimental vars
This commit is contained in:
parent
824f8e3d53
commit
4a6771a907
6 changed files with 20 additions and 24 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#?(:clj
|
#?(:clj
|
||||||
(defn ^:public handler:console
|
(defn ^:public handler:console
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
|
|
||||||
Returns a signal handler that:
|
Returns a signal handler that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
:cljs
|
:cljs
|
||||||
(defn ^:public handler:console
|
(defn ^:public handler:console
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
|
|
||||||
If `js/console` exists, returns a signal handler that:
|
If `js/console` exists, returns a signal handler that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
#?(:cljs
|
#?(:cljs
|
||||||
(defn ^:public handler:console-raw
|
(defn ^:public handler:console-raw
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
|
|
||||||
If `js/console` exists, returns a signal handler that:
|
If `js/console` exists, returns a signal handler that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
|
|
|
||||||
|
|
@ -307,8 +307,7 @@
|
||||||
|
|
||||||
#?(:clj
|
#?(:clj
|
||||||
(defmacro ^:public with-signal
|
(defmacro ^:public with-signal
|
||||||
"Experimental, subject to change.
|
"Executes given form, trapping errors. Returns the LAST signal created by form.
|
||||||
Executes given form, trapping errors. Returns the LAST signal created by form.
|
|
||||||
Useful for tests/debugging.
|
Useful for tests/debugging.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
@ -334,8 +333,7 @@
|
||||||
|
|
||||||
#?(:clj
|
#?(:clj
|
||||||
(defmacro ^:public with-signals
|
(defmacro ^:public with-signals
|
||||||
"Experimental, subject to change.
|
"Like `with-signal` but returns {:keys [value error signals]}.
|
||||||
Like `with-signal` but returns {:keys [value error signals]}.
|
|
||||||
Useful for more advanced tests/debugging.
|
Useful for more advanced tests/debugging.
|
||||||
|
|
||||||
Destructuring example:
|
Destructuring example:
|
||||||
|
|
@ -811,8 +809,7 @@
|
||||||
(defn add-interop-check! [source-id check-fn] (swap! interop-checks_ assoc source-id check-fn))
|
(defn add-interop-check! [source-id check-fn] (swap! interop-checks_ assoc source-id check-fn))
|
||||||
|
|
||||||
(defn ^:public check-interop
|
(defn ^:public check-interop
|
||||||
"Experimental, subject to change.
|
"Runs Telemere's registered interop checks and returns info useful
|
||||||
Runs Telemere's registered interop checks and returns info useful
|
|
||||||
for tests/debugging, e.g.:
|
for tests/debugging, e.g.:
|
||||||
|
|
||||||
{:open-telemetry {:present? false}
|
{:open-telemetry {:present? false}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
]})
|
]})
|
||||||
|
|
||||||
(defn handler:postal
|
(defn handler:postal
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
|
|
||||||
Needs `postal`, Ref. <https://github.com/drewr/postal>.
|
Needs `postal`, Ref. <https://github.com/drewr/postal>.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
]})
|
]})
|
||||||
|
|
||||||
(defn handler:slack
|
(defn handler:slack
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
|
|
||||||
Needs `clj-slack`, Ref. <https://github.com/julienXX/clj-slack>.
|
Needs `clj-slack`, Ref. <https://github.com/julienXX/clj-slack>.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
(sw output)))))))
|
(sw output)))))))
|
||||||
|
|
||||||
(defn handler:udp-socket
|
(defn handler:udp-socket
|
||||||
"Highly experimental, subject to change.
|
"Highly experimental, subject to change!
|
||||||
Feedback very welcome!
|
Feedback very welcome!
|
||||||
|
|
||||||
Returns a signal handler that:
|
Returns a signal handler that:
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
;;;; Unique IDs (UIDs)
|
;;;; Unique IDs (UIDs)
|
||||||
|
|
||||||
(defn nano-uid-fn
|
(defn nano-uid-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn nano-uid [root?]) that returns a random nano-style uid string like:
|
Returns a (fn nano-uid [root?]) that returns a random nano-style uid string like:
|
||||||
\"r76-B8LoIPs5lBG1_Uhdy\" - 126 bit (21 char) root uid
|
\"r76-B8LoIPs5lBG1_Uhdy\" - 126 bit (21 char) root uid
|
||||||
\"tMEYoZH0K-\" - 60 bit (10 char) non-root (child) uid"
|
\"tMEYoZH0K-\" - 60 bit (10 char) non-root (child) uid"
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
(comment ((nano-uid-fn) true))
|
(comment ((nano-uid-fn) true))
|
||||||
|
|
||||||
(defn hex-uid-fn
|
(defn hex-uid-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn hex-uid [root?]) that returns a random hex-style uid string like:
|
Returns a (fn hex-uid [root?]) that returns a random hex-style uid string like:
|
||||||
\"05039666eb9dc3206475f44ab9f3d843\" - 128 bit (32 char) root uid
|
\"05039666eb9dc3206475f44ab9f3d843\" - 128 bit (32 char) root uid
|
||||||
\"721fcef639a51513\" - 64 bit (16 char) non-root (child) uid"
|
\"721fcef639a51513\" - 64 bit (16 char) non-root (child) uid"
|
||||||
|
|
@ -161,8 +161,7 @@
|
||||||
(comment (js-console-logger))
|
(comment (js-console-logger))
|
||||||
|
|
||||||
(defn error-signal?
|
(defn error-signal?
|
||||||
"Experimental, subject to change.
|
"Returns true iff given signal has an `:error` value, or a `:kind` or `:level`
|
||||||
Returns true iff given signal has an `:error` value, or a `:kind` or `:level`
|
|
||||||
that indicates that it's an error."
|
that indicates that it's an error."
|
||||||
#?(:cljs {:tag 'boolean})
|
#?(:cljs {:tag 'boolean})
|
||||||
[signal]
|
[signal]
|
||||||
|
|
@ -238,7 +237,7 @@
|
||||||
|
|
||||||
#?(:clj
|
#?(:clj
|
||||||
(defn file-writer
|
(defn file-writer
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Opens the specified file and returns a stateful fn of 2 arities:
|
Opens the specified file and returns a stateful fn of 2 arities:
|
||||||
[content] => Writes given content to file, or noops if closed.
|
[content] => Writes given content to file, or noops if closed.
|
||||||
[] => Closes the writer.
|
[] => Closes the writer.
|
||||||
|
|
@ -441,7 +440,7 @@
|
||||||
;;;; Formatters
|
;;;; Formatters
|
||||||
|
|
||||||
(defn format-nsecs-fn
|
(defn format-nsecs-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn format [nanosecs]) that:
|
Returns a (fn format [nanosecs]) that:
|
||||||
- Takes a long nanoseconds (e.g. runtime).
|
- Takes a long nanoseconds (e.g. runtime).
|
||||||
- Returns a human-readable string like:
|
- Returns a human-readable string like:
|
||||||
|
|
@ -468,7 +467,7 @@
|
||||||
(comment (println (format-clj-stacktrace (:trace (truss/ex-map (truss/ex-info "Ex2" {:k2 "v2"} (truss/ex-info "Ex1" {:k1 "v1"})))))))
|
(comment (println (format-clj-stacktrace (:trace (truss/ex-map (truss/ex-info "Ex2" {:k2 "v2"} (truss/ex-info "Ex1" {:k1 "v1"})))))))
|
||||||
|
|
||||||
(defn format-error-fn
|
(defn format-error-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn format [error]) that:
|
Returns a (fn format [error]) that:
|
||||||
- Takes a platform error (`Throwable` or `js/Error`).
|
- Takes a platform error (`Throwable` or `js/Error`).
|
||||||
- Returns a human-readable error string."
|
- Returns a human-readable error string."
|
||||||
|
|
@ -505,7 +504,7 @@
|
||||||
;;;;
|
;;;;
|
||||||
|
|
||||||
(defn signal-preamble-fn
|
(defn signal-preamble-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn preamble [signal]) that:
|
Returns a (fn preamble [signal]) that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
- Returns a signal preamble ?string like:
|
- Returns a signal preamble ?string like:
|
||||||
|
|
@ -557,7 +556,7 @@
|
||||||
(comment (str (format-parent (str *ns*) {:id ::id1 :uid "uid1"})))
|
(comment (str (format-parent (str *ns*) {:id ::id1 :uid "uid1"})))
|
||||||
|
|
||||||
(defn signal-content-fn
|
(defn signal-content-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn content [signal]) that:
|
Returns a (fn content [signal]) that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
- Returns a human-readable signal content ?string (incl. data, ctx, etc.).
|
- Returns a human-readable signal content ?string (incl. data, ctx, etc.).
|
||||||
|
|
@ -636,7 +635,7 @@
|
||||||
((signal-content-fn) (tel/with-signal (tel/event! ::ev-id {:data {:k1 "v1"}}))))
|
((signal-content-fn) (tel/with-signal (tel/event! ::ev-id {:data {:k1 "v1"}}))))
|
||||||
|
|
||||||
(defn clean-signal-fn
|
(defn clean-signal-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn clean [signal]) that:
|
Returns a (fn clean [signal]) that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
- Returns a minimal signal (map) ready for printing, etc.
|
- Returns a minimal signal (map) ready for printing, etc.
|
||||||
|
|
@ -701,7 +700,7 @@
|
||||||
(comment ((clean-signal-fn {:incl-keys #{:a}}) {:level :info, :id nil, :a "a", :b "b", :msg_ (delay "hi")}))
|
(comment ((clean-signal-fn {:incl-keys #{:a}}) {:level :info, :id nil, :a "a", :b "b", :msg_ (delay "hi")}))
|
||||||
|
|
||||||
(defn pr-signal-fn
|
(defn pr-signal-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn pr [signal]) that:
|
Returns a (fn pr [signal]) that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
- Returns a machine-readable signal string.
|
- Returns a machine-readable signal string.
|
||||||
|
|
@ -766,7 +765,7 @@
|
||||||
(tel/with-signal (tel/event! ::ev-id {:kvs {:k1 "v1"}}))))
|
(tel/with-signal (tel/event! ::ev-id {:kvs {:k1 "v1"}}))))
|
||||||
|
|
||||||
(defn format-signal-fn
|
(defn format-signal-fn
|
||||||
"Experimental, subject to change.
|
"Alpha, subject to change.
|
||||||
Returns a (fn format [signal]) that:
|
Returns a (fn format [signal]) that:
|
||||||
- Takes a Telemere signal (map).
|
- Takes a Telemere signal (map).
|
||||||
- Returns a human-readable signal string.
|
- Returns a human-readable signal string.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue