hara.lang.type-notify

*notify-capture*

dynamic

*notify-override*

dynamic

add-listener

added in 4.0

(add-listener notify id sink-key f)

adds a listener to the sink

clear-oneshot-sinks

added in 4.0

(clear-oneshot-sinks {:keys [oneshots sinks]})

clear all registered oneshot sinks

clear-sink

added in 4.0

(clear-sink {:keys [sinks]} id)

clears a sink

default-notify

added in 4.0

(default-notify)

gets the default notify server

(notify/default-notify)

default-notify:reset

added in 4.0

(default-notify:reset)

resets the default notify server

get-oneshot-id

added in 4.0

(get-oneshot-id {:keys [oneshots]})

registers a oneshot id for the app server

get-sink

added in 4.0

(get-sink {:keys [sinks]} id)

gets a sink from the notification app server

handle-notify-http

added in 4.0

(handle-notify-http tx app)

handler for http request

handle-notify-socket

added in 4.0

(handle-notify-socket socket app)

handler for socket request

has-sink?

added in 4.0

(has-sink? {:keys [sinks]} id)

checks that sink exists

notify-server

added in 4.0

(notify-server {:keys [port], :as m})

create and start notify server

notify-server:create

added in 4.0

(notify-server:create {:keys [http-port socket-port]})

creates notify serve

process-capture

added in 4.0

(process-capture msg)

processes capture id option

process-message

added in 4.0

(process-message app input)

processes a message recieved by the notification server

process-print

added in 4.0

(process-print msg)

processes print id option

remove-listener

added in 4.0

(remove-listener notify id sink-key)

removes a listener from the sink

remove-oneshot-id

added in 4.0

(remove-oneshot-id {:keys [oneshots]} id)

removes a oneshot id

start-notify

added in 4.0

(start-notify app)

starts both servers

(notify/start-notify +server+) => map?

start-notify-http

added in 4.0

(start-notify-http {:keys [http-port sinks http-instance], :as app})

starts http server

start-notify-socket

added in 4.0

(start-notify-socket {:keys [socket-port socket-instance sinks], :as app})

starts socket server

stop-notify

added in 4.0

(stop-notify app)

stops both servers

stop-notify-http

added in 4.0

(stop-notify-http {:keys [http-instance], :as app})

stops http server

stop-notify-socket

added in 4.0

(stop-notify-socket {:keys [socket-instance], :as app})

stops socket server

watch-oneshot

added in 4.0

(watch-oneshot app timeout & [id])

returns a completable future

(notify/watch-oneshot +server+ 10) => (contains string? h/future?)