From 123584aed5eb4fd71fe6090e525c339843081630 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Thu, 3 Jan 2013 17:38:51 +0000 Subject: Specs. --- src/rabbit_mirror_queue_sync.erl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/rabbit_mirror_queue_sync.erl') diff --git a/src/rabbit_mirror_queue_sync.erl b/src/rabbit_mirror_queue_sync.erl index 040f3c9b..ac03ca8d 100644 --- a/src/rabbit_mirror_queue_sync.erl +++ b/src/rabbit_mirror_queue_sync.erl @@ -52,6 +52,25 @@ %% || || -- sync_complete --> || %% || (Dies) || +-ifdef(use_specs). + +-type(log_fun() :: fun ((string(), [any()]) -> 'ok')). +-type(bq() :: atom()). +-type(bqs() :: any()). + +-spec(master_prepare/3 :: (reference(), log_fun(), [pid()]) -> pid()). +-spec(master_go/5 :: (pid(), reference(), log_fun(), bq(), bqs()) -> + {'already_synced', bqs()} | {'ok', bqs()} | + {'shutdown', any(), bqs()} | + {'sync_died', any(), bqs()}). +-spec(slave/7 :: (non_neg_integer(), reference(), timer:tref(), pid(), + bq(), bqs(), fun((bq(), bqs()) -> {timer:tref(), bqs()})) -> + 'denied' | + {'ok' | 'failed', {timer:tref(), bqs()}} | + {'stop', any(), {timer:tref(), bqs()}}). + +-endif. + %% --------------------------------------------------------------------------- %% Master -- cgit v1.2.1