summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-02-24 11:26:16 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2012-02-24 11:26:16 +0000
commit07d53486fe266a6269aab08f1c8f6fc99ea8a577 (patch)
tree79b5ddb32f9878e57a9100104b00c005bf6b3eb4
parente729369eb4af72635c3ff5fb629c042e4a09ce99 (diff)
downloadrabbitmq-server-07d53486fe266a6269aab08f1c8f6fc99ea8a577.tar.gz
cosmetic: make spec order match export/definition order
...and introduce a useful type alias
-rw-r--r--src/rabbit.erl16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 0a0ca90a..a94af4ec 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -212,14 +212,13 @@
-type(file_suffix() :: binary()).
%% this really should be an abstract type
-type(log_location() :: 'tty' | 'undefined' | file:filename()).
+-type(param() :: atom()).
-spec(maybe_hipe_compile/0 :: () -> 'ok').
-spec(prepare/0 :: () -> 'ok').
-spec(start/0 :: () -> 'ok').
-spec(stop/0 :: () -> 'ok').
-spec(stop_and_halt/0 :: () -> no_return()).
--spec(rotate_logs/1 :: (file_suffix()) -> rabbit_types:ok_or_error(any())).
--spec(force_event_refresh/0 :: () -> 'ok').
-spec(status/0 ::
() -> [{pid, integer()} |
{running_applications, [{atom(), string(), string()}]} |
@@ -228,12 +227,11 @@
{memory, any()}]).
-spec(is_running/0 :: () -> boolean()).
-spec(is_running/1 :: (node()) -> boolean()).
--spec(environment/0 :: () -> [{atom() | term()}]).
--spec(log_location/1 :: ('sasl' | 'kernel') -> log_location()).
+-spec(environment/0 :: () -> [{param() | term()}]).
+-spec(rotate_logs/1 :: (file_suffix()) -> rabbit_types:ok_or_error(any())).
+-spec(force_event_refresh/0 :: () -> 'ok').
--spec(maybe_insert_default_data/0 :: () -> 'ok').
--spec(boot_delegate/0 :: () -> 'ok').
--spec(recover/0 :: () -> 'ok').
+-spec(log_location/1 :: ('sasl' | 'kernel') -> log_location()).
-spec(start/2 :: ('normal',[]) ->
{'error',
@@ -243,6 +241,10 @@
{'ok',pid()}).
-spec(stop/1 :: (_) -> 'ok').
+-spec(maybe_insert_default_data/0 :: () -> 'ok').
+-spec(boot_delegate/0 :: () -> 'ok').
+-spec(recover/0 :: () -> 'ok').
+
-endif.
%%----------------------------------------------------------------------------