summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-09-08 17:12:56 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-09-08 17:12:56 +0100
commita18dde80c58c3d6d312e431e933adce2804cad6e (patch)
tree393f999e88e2fcfc29d925af576fd2c919c0ea1d /src
parent2e88be5d470b0f38aef3abcfef1cd2ac6b7c83b4 (diff)
downloadrabbitmq-server-git-a18dde80c58c3d6d312e431e933adce2804cad6e.tar.gz
add rabbitmq-plugin stub
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_plugin.erl48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/rabbit_plugin.erl b/src/rabbit_plugin.erl
new file mode 100644
index 0000000000..4987dc5952
--- /dev/null
+++ b/src/rabbit_plugin.erl
@@ -0,0 +1,48 @@
+%% The contents of this file are subject to the Mozilla Public License
+%% Version 1.1 (the "License"); you may not use this file except in
+%% compliance with the License. You may obtain a copy of the License
+%% at http://www.mozilla.org/MPL/
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and
+%% limitations under the License.
+%%
+%% The Original Code is RabbitMQ.
+%%
+%% The Initial Developer of the Original Code is VMware, Inc.
+%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved.
+%%
+
+-module(rabbit_plugin).
+-include("rabbit.hrl").
+
+-export([start/0, stop/0]).
+
+%%----------------------------------------------------------------------------
+
+-ifdef(use_specs).
+
+-spec(start/0 :: () -> no_return()).
+-spec(stop/0 :: () -> 'ok').
+
+-endif.
+
+%%----------------------------------------------------------------------------
+
+start() ->
+ io:format("Rabbitmq-plugin, GO!~n"),
+
+ quit(0).
+
+stop() ->
+ ok.
+
+%%----------------------------------------------------------------------------
+
+%% the slower shutdown on windows required to flush stdout
+quit(Status) ->
+ case os:type() of
+ {unix, _} -> halt(Status);
+ {win32, _} -> init:stop(Status)
+ end.