val pp_error : Stdlib.Format.formatter -> error -> unit
attach queue client blockdevice attaches to a previously-created shared ring on top of
detach t frees all resources associated with
t. Attempts to use
t after a detach will result in an
state t () queries the current state of the ring. If the result is `Suspended then the producer has acknowledged and will nolonger produce items. Clients which support suspend/resume should arrange to call this function periodically.
debug_info t returns a list of key=value pairs which may be useful for debugging. Nothing should be assumed about the keys or the values; they should only be printed or logged.
suspend t signals that the producer should stop pushing items. Note this function returns before the producer has acknowledged. The result `Retry means that a previous call to
resume has not been acknowledged; the client should retry.
resume t signals that a producer may again start pushing items. This call does not wait for an acknowledgement from the producer. Note it is not an error to resume an already-resumed queue. The result `Retry means that a previous call to
suspend has not been acknowledged; the client should retry.
peek t ?position () returns a pair
(position, item) where
item is the next item on the ring after
from. Repeated calls to
pop will return the same
item. To indicate that the item has been processed, call
`Retry means there is no item available at the moment and the client should try again later.
val fold :
f:(item -> 'a -> 'a) ->
(position * 'a) result Lwt.t
peek_all f t ?position init () folds
f across all the values that can be immediately
peeked from the ring. If any of the
fold operations fail then the whole operation fails. The successful result includes the final
position which can be used to consume all the items at once.