diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-08-05 13:00:13 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-08-05 13:00:13 +0100 |
commit | 38b6cb44dbf85ce8aacc4b568e35e41f050c17b3 (patch) | |
tree | 867835b80721308b70a588ac8db6f02e5dbf3dfd | |
parent | ebf35760703f27a14426c0c9824bb53a6a7c3cc6 (diff) | |
download | rabbitmq-server-38b6cb44dbf85ce8aacc4b568e35e41f050c17b3.tar.gz |
more specs
Specs for gatherer, gm, priority_queue, rabbit and rabbit_sup are up
to date.
-rw-r--r-- | src/file_handle_cache.erl | 2 | ||||
-rw-r--r-- | src/gatherer.erl | 2 | ||||
-rw-r--r-- | src/gm.erl | 4 | ||||
-rw-r--r-- | src/rabbit_sup.erl | 15 |
4 files changed, 19 insertions, 4 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index 722f254a..114fb9cb 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -230,7 +230,7 @@ -spec(register_callback/3 :: (atom(), atom(), [any()]) -> 'ok'). -spec(open/3 :: - (string(), [any()], + (file:filename(), [any()], [{'write_buffer', (non_neg_integer() | 'infinity' | 'unbuffered')}]) -> val_or_error(ref())). -spec(close/1 :: (ref()) -> ok_or_error()). diff --git a/src/gatherer.erl b/src/gatherer.erl index aa43e9a9..fe976b50 100644 --- a/src/gatherer.erl +++ b/src/gatherer.erl @@ -27,7 +27,7 @@ -ifdef(use_specs). --spec(start_link/0 :: () -> {'ok', pid()} | {'error', any()}). +-spec(start_link/0 :: () -> rabbit_types:ok_pid_or_error()). -spec(stop/1 :: (pid()) -> 'ok'). -spec(fork/1 :: (pid()) -> 'ok'). -spec(finish/1 :: (pid()) -> 'ok'). @@ -422,9 +422,9 @@ -type(group_name() :: any()). --spec(create_tables/0 :: () -> 'ok'). +-spec(create_tables/0 :: () -> 'ok' | {'aborted', any()}). -spec(start_link/3 :: (group_name(), atom(), any()) -> - {'ok', pid()} | {'error', any()}). + rabbit_types:ok_pid_or_error()). -spec(leave/1 :: (pid()) -> 'ok'). -spec(broadcast/2 :: (pid(), any()) -> 'ok'). -spec(confirmed_broadcast/2 :: (pid(), any()) -> 'ok'). diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl index 508b127e..802ea5e2 100644 --- a/src/rabbit_sup.erl +++ b/src/rabbit_sup.erl @@ -27,6 +27,21 @@ -define(SERVER, ?MODULE). +%%---------------------------------------------------------------------------- + +-ifdef(use_specs). + +-spec(start_link/0 :: () -> rabbit_types:ok_pid_or_error()). +-spec(start_child/1 :: (atom()) -> 'ok'). +-spec(start_child/3 :: (atom(), atom(), [any()]) -> 'ok'). +-spec(start_restartable_child/1 :: (atom()) -> 'ok'). +-spec(start_restartable_child/2 :: (atom(), [any()]) -> 'ok'). +-spec(stop_child/1 :: (atom()) -> rabbit_types:ok_or_error(any())). + +-endif. + +%%---------------------------------------------------------------------------- + start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). |