Liking cljdoc? Tell your friends :D

ken.tap

Observability instrumentation using a global 'tap' which can have events reported to it from any location in the code. This draws inspiration from Clojure's tap>, but is more directly targeted at instrumentation.

Observability instrumentation using a global 'tap' which can have events
reported to it from any location in the code. This draws inspiration from
Clojure's `tap>`, but is more directly targeted at instrumentation.
raw docstring

clear!clj

(clear!)

Remove all subscriptions from the tap.

Remove all subscriptions from the tap.
sourceraw docstring

drain!clj

(drain!)

Drain the current event-queue to empty it. Mostly useful for testing.

Drain the current event-queue to empty it. Mostly useful for testing.
sourceraw docstring

queue-sizeclj

(queue-size)

Return the number of events currently in the queue.

Return the number of events currently in the queue.
sourceraw docstring

sendclj

(send event)
(send event timeout-ms)

Send the given event to be published to any subscribed tap functions. Returns true if the event was accepted or false if it was dropped.

By default this returns immediately. If a timeout is given, this will block until the event is accepted or the timeout expires.

Send the given event to be published to any subscribed tap functions.
Returns true if the event was accepted or false if it was dropped.

By default this returns immediately. If a timeout is given, this will block
until the event is accepted or the timeout expires.
sourceraw docstring

subscribe!clj

(subscribe! k f)

Subscribe a function to be called with all events sent to the tap. Returns the key k.

The key uniquely identifies the function and will replace any existing subscription; it may also be used to remove it later with unsubscribe!.

Subscribe a function to be called with all events sent to the tap. Returns
the key `k`.

The key uniquely identifies the function and will replace any existing
subscription; it may also be used to remove it later with `unsubscribe!`.
sourceraw docstring

unsubscribe!clj

(unsubscribe! k)

Remove the identified function from the tap subscriptions.

Remove the identified function from the tap subscriptions.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close