diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/rabbit_backing_queue_spec.hrl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl index 20fe4234..b58077d8 100644 --- a/include/rabbit_backing_queue_spec.hrl +++ b/include/rabbit_backing_queue_spec.hrl @@ -28,6 +28,13 @@ -type(async_callback() :: fun ((atom(), fun ((atom(), state()) -> state())) -> 'ok')). -type(duration() :: ('undefined' | 'infinity' | number())). +-type(msg_lookup_result() :: {rabbit_types:basic_message(), state()}). + +-type(msg_lookup_fun() :: fun((state()) -> msg_lookup_result())). + +-type(msg_lookup_callback() :: + fun((msg_lookup_fun(), state()) -> state())). + -spec(start/1 :: ([rabbit_amqqueue:name()]) -> 'ok'). -spec(stop/0 :: () -> 'ok'). -spec(init/3 :: (rabbit_types:amqqueue(), attempt_recovery(), @@ -45,12 +52,14 @@ rabbit_types:message_properties(), pid(), state()) -> {undefined, state()}). -spec(drain_confirmed/1 :: (state()) -> {[rabbit_guid:guid()], state()}). --spec(dropwhile/2 :: - (fun ((rabbit_types:message_properties()) -> boolean()), state()) +-spec(dropwhile/3 :: + (fun ((rabbit_types:message_properties()) -> boolean()), + msg_lookup_callback(), state()) -> state()). -spec(fetch/2 :: (true, state()) -> {fetch_result(ack()), state()}; (false, state()) -> {fetch_result(undefined), state()}). --spec(ack/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). +-spec(ack/3 :: ([ack()], msg_lookup_callback(), state()) -> + {[rabbit_guid:guid()], state()}). -spec(requeue/3 :: ([ack()], message_properties_transformer(), state()) -> {[rabbit_guid:guid()], state()}). -spec(len/1 :: (state()) -> non_neg_integer()). |