Skip to content

Commit

Permalink
Switch over to R15+ style callbacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeiklejohn committed May 12, 2014
1 parent 268afc1 commit a33ac81
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/riak_pipe_vnode_worker.erl
Expand Up @@ -139,7 +139,6 @@
send_output/3,
send_output/4,
send_output/5]).
-export([behaviour_info/1]).

%% gen_fsm callbacks
-export([
Expand All @@ -163,14 +162,16 @@
-opaque state() :: #state{}.
-export_type([state/0]).

%% @doc Get information about this behavior.
-spec behaviour_info(atom()) -> 'undefined' | [{atom(), arity()}].
behaviour_info(callbacks) ->
[{init,2},
{process,3},
{done,1}];
behaviour_info(_Other) ->
undefined.
-type callback_state() :: term().

-callback init(riak_pipe_vnode:partition(),
riak_pipe_fitting:details()) ->
{ok, callback_state()}.
-callback process(term(), boolean(), callback_state()) ->
{ok, callback_state()} |
{forward_preflist, callback_state()} |
{{error, term()}, callback_state()}.
-callback done(callback_state()) -> ok.

%%%===================================================================
%%% API
Expand Down

0 comments on commit a33ac81

Please sign in to comment.