This is the cl-disque Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:50:23 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-disque
A Disque client for Common Lisp
Cody Reichert <codyreichert@gmail.com>
Cody Reichert <codyreichert@gmail.com>
MIT
0.0.1
rutils
(system).
cl-ppcre
(system).
usocket
(system).
flexi-streams
(system).
babel
(system).
src
(module).
Modules are listed depth-first from the system components tree.
cl-disque/src
cl-disque
(system).
package.lisp
(file).
float.lisp
(file).
connection.lisp
(file).
cl-disque.lisp
(file).
commands.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-disque/cl-disque.asd
cl-disque/src/package.lisp
cl-disque/src/float.lisp
cl-disque/src/connection.lisp
cl-disque/src/cl-disque.lisp
cl-disque/src/commands.lisp
cl-disque/src/float.lisp
src
(module).
parse-float
(function).
radix-values
(function).
cl-disque/src/connection.lisp
src
(module).
*connection*
(special variable).
*echo-p*
(special variable).
*echo-stream*
(special variable).
close-connection
(function).
connect
(function).
connected-p
(function).
disconnect
(function).
initialize-instance
(method).
open-connection
(function).
reconnect
(function).
with-connection
(macro).
with-persistent-connection
(macro).
with-recursive-connection
(macro).
+utf8+
(special variable).
cl-disque-connection
(class).
conn-auth
(reader method).
conn-host
(reader method).
conn-port
(reader method).
conn-socket
(reader method).
(setf conn-socket)
(writer method).
conn-stream
(reader method).
(setf conn-stream)
(writer method).
connection-open-p
(function).
reconnect-restart-case
(macro).
reopen-connection
(function).
with-reconnect-restart
(macro).
cl-disque/src/cl-disque.lisp
src
(module).
*cmd-prefix*
(special variable).
def-cmd
(macro).
def-expect-method
(macro).
disque-bad-reply
(condition).
disque-connection-error
(condition).
disque-error
(condition).
disque-error-message
(reader method).
disque-error-reply
(condition).
expect
(generic function).
tell
(generic function).
with-pipelining
(macro).
*pipeline*
(special variable).
*pipelined*
(special variable).
disque-error-error
(reader method).
ensure-string
(function).
format-disque-number
(function).
format-disque-string
(function).
read-bulk-reply
(macro).
with-disque-in
(macro).
Packages are listed by definition order.
cl-disque
common-lisp
.
rtl
.
*cmd-prefix*
(special variable).
*connection*
(special variable).
*echo-p*
(special variable).
*echo-stream*
(special variable).
close-connection
(function).
connect
(function).
connected-p
(function).
def-cmd
(macro).
def-expect-method
(macro).
disconnect
(function).
disque-ackjob
(function).
disque-addjob
(function).
disque-bad-reply
(condition).
disque-connection-error
(condition).
disque-deljob
(function).
disque-dequeue
(function).
disque-enqueue
(function).
disque-error
(condition).
disque-error-message
(generic reader).
disque-error-reply
(condition).
disque-fastack
(function).
disque-getjob
(function).
disque-hello
(function).
disque-info
(function).
disque-jscan
(function).
disque-nack
(function).
disque-qlen
(function).
disque-qpeek
(function).
disque-qscan
(function).
disque-show
(function).
disque-working
(function).
expect
(generic function).
open-connection
(function).
reconnect
(function).
tell
(generic function).
with-connection
(macro).
with-persistent-connection
(macro).
with-pipelining
(macro).
with-recursive-connection
(macro).
*pipeline*
(special variable).
*pipelined*
(special variable).
+utf8+
(special variable).
ackjob
(function).
addjob
(function).
cl-disque-connection
(class).
conn-auth
(generic reader).
conn-host
(generic reader).
conn-port
(generic reader).
conn-socket
(generic reader).
(setf conn-socket)
(generic writer).
conn-stream
(generic reader).
(setf conn-stream)
(generic writer).
connection-open-p
(function).
deljob
(function).
dequeue
(function).
disque-error-error
(generic reader).
enqueue
(function).
ensure-string
(function).
fastack
(function).
format-disque-number
(function).
format-disque-string
(function).
getjob
(function).
hello
(function).
info
(function).
jscan
(function).
nack
(function).
parse-float
(function).
qlen
(function).
qpeek
(function).
qscan
(function).
radix-values
(function).
read-bulk-reply
(macro).
reconnect-restart-case
(macro).
reopen-connection
(function).
show
(function).
with-disque-in
(macro).
with-reconnect-restart
(macro).
working
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Prefix for functions names that implement Disque commands.
The current Disque connection.
Whether the server-client communication should be echoed to the stream specified by *ECHO-STREAM*. The default is NIL, meaning no echoing.
A stream to which the server-client communication will be echoed for debugging purposes. The default is *STANDARD-OUTPUT*.
Define and export a function with the name <*CMD-REDIX*>-<CMD> for processing a Disque command CMD. Here REPLY-TYPE is the expected reply format.
Define a specialized EXPECT method. BODY may refer to the ~ variable REPLY, which is bound to the reply received from Disque ~ server with the first character removed.
Evaluate BODY with the current connection bound to a new connection specified by the given HOST and PORT
Execute BODY inside WITH-CONNECTION. But if connection is broken due to DISQUE-CONNECTION-ERROR (a network error or timeout), transparently reopen it.
Delay execution of EXPECT’s inside BODY to the end, so that all commands are first sent to the server and then their output is received and collected into a list. So commands return :PIPELINED instead of the expected results.
Execute BODY with *CONNECTION* bound to the default Disque connection. If connection is already established, reuse it.
Close the socket of CONN.
Connect to Disque server.
Is there a current connection?
Disconnect from Disque server.
Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.
Adds a job to the specified queue.
Completely delete a job from a node. Note that this is similar to FASTACK, but limited to a single node since no DELJOB cluster bus message is sent to other nodes.
Remove jobs from the queue.
Queue jobs if not already queued.
Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.
Gets a job from the specific queue.
Returns hello format version, this node ID, all the nodes IDs, IP addresses, ports, and priority (lower is better, means node more available). Clients should use this as an handshake command when connecting with a Disque node.
JSCAN provides an interface to iterate all the existing jobs in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call the cursor must be 0, in the next calls the cursor returned in the previous call is used next. The iterator guarantees to return all elements but may return duplicates.
The NACK command tells Disque to put back the job in the queue ASAP. It is very similar to ENQUEUE but it increments the job nacks counter instead of the additional-deliveries counter. The command should be used when the worker was not able to process a message and wants the message to be put back into the queue in order to be processed again.
Return, without consuming from queue, count jobs. If count is positive the specified number of jobs are returned from the oldest to the newest (in the same best-effort FIFO order as GETJOB). If count is negative the commands changes behavior and shows the count newest jobs, from the newest from the oldest.
The command provides an interface to iterate all the existing queues in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call cursor must be 0, in the next calls the cursor returned in the previous call is used in the next. The iterator guarantees to return all the elements but may return duplicated elements.
Claims to be still working with the specified job, and asks Disque to postpone the next time it will deliver again the job. The next delivery is postponed for the job retry time, however the command works in a best effort way since there is no way to guarantee during failures that another node in a different network partition is performing a delivery of the same job.
Create a socket connection to the host and port of CONNECTION and set the socket of CONN to the associated socket.
Close and reopen the connection to Disque server.
disque-error
)) ¶Receive and process the reply of the given type from Disque server.
(eql :bytes)
)) ¶Receive and process the reply of type BYTES.
(eql :float)
)) ¶Receive and process the reply of type FLOAT.
(eql :list)
)) ¶(eql :end)
)) ¶(eql :pubsub)
)) ¶(eql :queued)
)) ¶Receive and process the reply of type QUEUED.
(eql :multi)
)) ¶Receive and process the reply of type MULTI.
(eql :bulk)
)) ¶Receive and process the reply of type BULK.
(eql :integer)
)) ¶Receive and process the reply of type INTEGER.
(eql :boolean)
)) ¶Receive and process the reply of type BOOLEAN.
(eql :inline)
)) ¶Receive and process the reply of type INLINE.
(eql :status)
)) ¶Receive and process status reply, which is just a string, preceeded with +.
(eql :anything)
)) ¶Receive and process status reply, which is just a string, preceeded with +.
Send a command to Disque server over a socket connection.
CMD is the command name (a string or a symbol), and ARGS are its arguments
(keyword arguments are also supported).
(eql cl-disque::jscan)
) &rest args) ¶(eql cl-disque::addjob)
) &rest args) ¶(eql cl-disque::getjob)
) &rest args) ¶(eql cl-disque::qscan)
) &rest args) ¶cl-disque-connection
) &key) ¶Disque protocol error is detected.
Conditions of this type are signaled when errors occur
that break the connection stream. They offer a :RECONNECT restart.
Any Disque-related error.
Error reply is received from Disque server.
A list of expected results from the current pipeline.
Indicates, that commands are sent in pipelined mode.
Signal the condition of type DISQUE-CONNECTION-ERROR denoted by
the given ERROR and COMMENT offering a :RECONNECT restart to re-evaluate BODY.
When, during the execution of BODY, an error occurs that breaks the connection, a DISQUE-CONNECTION-ERROR is signalled, offering a :RECONNECT restart that will re-evaluate body after the conenction is re-established.
Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.
Adds a job to the specified queue.
Is the socket of CONNECTION open?
Completely delete a job from a node. Note that this is similar to FASTACK, but limited to a single node since no DELJOB cluster bus message is sent to other nodes.
Remove jobs from the queue.
Queue jobs if not already queued.
Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.
Write a prefix char and a number to the stream of the current connection. If *ECHOP-P* is not NIL, write that string to *ECHO-STREAM*, too.
Write a string and CRLF-terminator to the stream of the current connection. If *ECHOP-P* is not NIL, write that string to *ECHO-STREAM*, too.
Gets a job from the specific queue.
Returns hello format version, this node ID, all the nodes IDs, IP addresses, ports, and priority (lower is better, means node more available). Clients should use this as an handshake command when connecting with a Disque node.
Generic server information / stats.
JSCAN provides an interface to iterate all the existing jobs in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call the cursor must be 0, in the next calls the cursor returned in the previous call is used next. The iterator guarantees to return all elements but may return duplicates.
The NACK command tells Disque to put back the job in the queue ASAP. It is very similar to ENQUEUE but it increments the job nacks counter instead of the additional-deliveries counter. The command should be used when the worker was not able to process a message and wants the message to be put back into the queue in order to be processed again.
Returns the length of the queue.
Return, without consuming from queue, count jobs. If count is positive the specified number of jobs are returned from the oldest to the newest (in the same best-effort FIFO order as GETJOB). If count is negative the commands changes behavior and shows the count newest jobs, from the newest from the oldest.
The command provides an interface to iterate all the existing queues in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call cursor must be 0, in the next calls the cursor returned in the previous call is used in the next. The iterator guarantees to return all the elements but may return duplicated elements.
Close and reopen CONN.
Describe the job.
Claims to be still working with the specified job, and asks Disque to postpone the next time it will deliver again the job. The next delivery is postponed for the job retry time, however the command works in a best effort way since there is no way to guarantee during failures that another node in a different network partition is performing a delivery of the same job.
cl-disque-connection
)) ¶automatically generated reader method
auth
.
cl-disque-connection
)) ¶automatically generated reader method
host
.
cl-disque-connection
)) ¶automatically generated reader method
port
.
cl-disque-connection
)) ¶automatically generated reader method
cl-disque-connection
)) ¶automatically generated writer method
cl-disque-connection
)) ¶automatically generated reader method
cl-disque-connection
)) ¶automatically generated writer method
disque-error
)) ¶Jump to: | (
A C D E F G H I J M N O P Q R S T W |
---|
Jump to: | (
A C D E F G H I J M N O P Q R S T W |
---|
Jump to: | *
+
A E H M P S |
---|
Jump to: | *
+
A E H M P S |
---|
Jump to: | C D F M P S |
---|
Jump to: | C D F M P S |
---|