Connect to a postgres-database and wait for a NOTIFY of the database. This notify-event triggers a function, which receives the payload as EDN if the payload was initially encoded as JSON (for example with postgres' function "row_to_json()".
Connect to a postgres-database and wait for a NOTIFY of the database. This notify-event triggers a function, which receives the payload as EDN if the payload was initially encoded as JSON (for example with postgres' function "row_to_json()".
(arm-listener f event)
Creates listener for new events in the eventstore. f/1 needs to be a function, which gets one parameter, which is the (transformed) payload published by postgres' trigger. And the event must match with the name of the trigger, e.g. "new_event".
For example: (arm-listener (fn [payload] (println payload)) "new_event")
Creates listener for new events in the eventstore. f/1 needs to be a function, which gets one parameter, which is the (transformed) payload published by postgres' trigger. And the event must match with the name of the trigger, e.g. "new_event". For example: (arm-listener (fn [payload] (println payload)) "new_event")
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close