rebar/priv/templates/simplesrv.erl

51 lines
1.4 KiB
Erlang
Raw Normal View History

-module({{srvid}}).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([start_link/0]).
%% ------------------------------------------------------------------
%% gen_server Function Exports
%% ------------------------------------------------------------------
2011-07-13 15:59:07 +00:00
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
%% ------------------------------------------------------------------
%% API Function Definitions
%% ------------------------------------------------------------------
start_link() ->
2011-07-13 15:59:07 +00:00
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
%% ------------------------------------------------------------------
%% gen_server Function Definitions
%% ------------------------------------------------------------------
init(Args) ->
2011-07-13 15:59:07 +00:00
{ok, Args}.
handle_call(_Request, _From, State) ->
2012-01-16 04:06:41 +00:00
{reply, ok, State}.
handle_cast(_Msg, State) ->
2011-07-13 15:59:07 +00:00
{noreply, State}.
handle_info(_Info, State) ->
2011-07-13 15:59:07 +00:00
{noreply, State}.
terminate(_Reason, _State) ->
2011-07-13 15:59:07 +00:00
ok.
code_change(_OldVsn, State, _Extra) ->
2011-07-13 15:59:07 +00:00
{ok, State}.
%% ------------------------------------------------------------------
%% Internal Function Definitions
%% ------------------------------------------------------------------