(add-listener conn network dbid key fn)
Registers a new listener function, fn, on connection.
Each listener must have an associated key, which is used to remove the listener when needed but is otherwise opaque to the function. Each key must be unique for the given network + dbid.
Registers a new listener function, fn, on connection. Each listener must have an associated key, which is used to remove the listener when needed but is otherwise opaque to the function. Each key must be unique for the given network + dbid.
(add-token conn token)
Adds token to connection information so it is available to submit storage read requests.
Returns true if successful, false otherwise.
Adds token to connection information so it is available to submit storage read requests. Returns true if successful, false otherwise.
(close! conn)
Closes connection, returns true if close successful, false if already closed.
Closes connection, returns true if close successful, false if already closed.
(connect servers & [opts])
Creates a connection to a ledger group server. Provide servers in either a sequence or as a string that is comma-separated.
Creates a connection to a ledger group server. Provide servers in either a sequence or as a string that is comma-separated.
(default-publish-fn conn message)
Publishes message to the websocket associated with the connection.
Publishes message to the websocket associated with the connection.
(establish-socket conn-id sub-chan pub-chan servers)
(get-healthy-server conn-id servers)
Returns a core async channel that will contain first healthy as it appears.
Use with a timeout to consume, as no healthy servers may be avail.
Returns a core async channel that will contain first healthy as it appears. Use with a timeout to consume, as no healthy servers may be avail.
(get-server conn-id servers)
returns promise channel, check for errors
returns promise channel, check for errors
(get-socket conn)
Gets websocket from connection, or establishes one if not already done.
Returns a core async promise channel. Check for exceptions.
Gets websocket from connection, or establishes one if not already done. Returns a core async promise channel. Check for exceptions.
(msg-consumer conn)
Takes messages from peer/ledger and processes them.
Takes messages from peer/ledger and processes them.
(msg-producer conn)
Shuffles outgoing messages to the web socket in order.
Shuffles outgoing messages to the web socket in order.
(ping-transactor conn)
(remove-listener conn network dbid key)
Removes listener on given network + dbid for the provided key.
The key is the same provided for add-listener when registering.
Will return true if a function exists for that key and it was removed.
Removes listener on given network + dbid for the provided key. The key is the same provided for add-listener when registering. Will return true if a function exists for that key and it was removed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close