diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-01-03 17:38:51 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-01-03 17:38:51 +0000 |
commit | 123584aed5eb4fd71fe6090e525c339843081630 (patch) | |
tree | d0485e9086b293ff809ae17aaabe07500d23b077 /src/rabbit_mirror_queue_sync.erl | |
parent | 514e84e5a865b03b3ddda30ea3a0f09c5ff9ae94 (diff) | |
download | rabbitmq-server-123584aed5eb4fd71fe6090e525c339843081630.tar.gz |
Specs.
Diffstat (limited to 'src/rabbit_mirror_queue_sync.erl')
-rw-r--r-- | src/rabbit_mirror_queue_sync.erl | 19 |
1 files changed, 19 insertions, 0 deletions
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 |