Skip to content

Instantly share code, notes, and snippets.

@videlalvaro
Created July 5, 2015 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlalvaro/785d160e5af417c33ab6 to your computer and use it in GitHub Desktop.
Save videlalvaro/785d160e5af417c33ab6 to your computer and use it in GitHub Desktop.
include ../umbrella.mk
# yes, this file is empty
%% this file goes in src/sample_plugin.app.src
{application, sample_plugin,
[{description, "Sample Plugin"},
{vsn, "0.1.0"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib, rabbit]}]}.
%% this file goes in src/sample_plugin.erl
-module(sample_plugin).
-export([init/1]).
-rabbit_boot_step(
{?MODULE,
[{description, "sample plugin"},
{mfa, {?MODULE, init,
[my_arg]}},
{requires, rabbit_registry},
{enables, kernel_ready}]}).
init(Arg) ->
io:format("Arg: ~p priv_dir: ~p~n", [Arg, code:priv_dir(sample_plugin)]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment