(add-subscriptions conn streams)
Subscribe to the specified streams. Returns a channel.
Subscribe to the specified streams. Returns a channel.
(cancelable-retry kill-channel async-fn)
In go-loop awaits async-fn
for non-exception result. If anything is put on
kill-channel, returns `:killed
In go-loop awaits `async-fn` for non-exception result. If anything is put on kill-channel, returns `:killed
(close!)
(close! conn)
Attempt to kill any request threads still running.
Attempt to kill any request threads still running.
(connection user-opts)
Create a new connection pool based on the given user-opts. Return a dict of the connection elements.
Create a new connection pool based on the given user-opts. Return a dict of the connection elements.
(event-queue conn)
Create a durable event publisher. Returns two channels, the first one publishes a stream of messages. The second can be used to close the stream (by putting anything into it). Attempts to recover from server failures by re-trying and re-registering
Create a durable event publisher. Returns two channels, the first one publishes a stream of messages. The second can be used to close the stream (by putting anything into it). Attempts to recover from server failures by re-trying and re-registering
(events conn queue-id last-event-id)
(events conn queue-id last-event-id dont-block)
Get events from the specified queue occuring after last-event-id. Returns a channel.
Get events from the specified queue occuring after last-event-id. Returns a channel.
(members conn)
Get members of your entire organization. Returns a channel. TODO: Can this return for only one or more streams?
Get members of your entire organization. Returns a channel. TODO: Can this return for only one or more streams?
(register conn)
(register conn event-types)
(register conn event-types apply-markdown)
Register a queue to listen for certain event types. Returns a channel with :queue_id, :max_message_id, and :last_event_id keys.
Register a queue to listen for certain event types. Returns a channel with :queue_id, :max_message_id, and :last_event_id keys.
(remove-subscriptions conn streams)
Unsubscribe from the specified streams. Returns a channel.
Unsubscribe from the specified streams. Returns a channel.
(send-message & more)
Dispatches to relevant send message function based on whether a stream (string) or list of users is given.
Dispatches to relevant send message function based on whether a stream (string) or list of users is given.
(send-private-message conn users message)
Send a private message to specified users. Returns a channel with the result.
Send a private message to specified users. Returns a channel with the result.
(send-stream-message conn stream subject message)
Send a message to a specific stream. Returns a channel with the result.
Send a message to a specific stream. Returns a channel with the result.
(subscribe-events conn {queue-id :queue_id last-event-id :last_event_id})
(subscribe-events conn queue-id last-event-id)
Continuously issue requests against the events endpoint, updating
the last-event-id so that each event is only returned once. Returns two
channels, the first one publishes events. The second is a kill channel.
If an exception is encountered, it is also passed through the publisher
channel, and the channels will be closed afterwards.
Use register
to obtain a event queue.
Deprecated, use event-queue
instead, it automatically reconnects
Continuously issue requests against the events endpoint, updating the last-event-id so that each event is only returned once. Returns two channels, the first one publishes events. The second is a kill channel. If an exception is encountered, it is also passed through the publisher channel, and the channels will be closed afterwards. Use `register` to obtain a event queue. Deprecated, use `event-queue` instead, it automatically reconnects
(subscriptions conn)
Get a list of current subscriptions. Returns a channel.
Get a list of current subscriptions. Returns a channel.
(sync* & body)
Wrapper macro to make a request synchronously.
Wrapper macro to make a request synchronously.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close