mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
6c359a08cd
- simplefsm - Basic shell of a gen_fsm module - simplesrv - Basic shell of a gen_server module - simplemod - Basic shell of a module along with an associated test module.
49 lines
1.4 KiB
Erlang
49 lines
1.4 KiB
Erlang
-module({{srvid}}).
|
|
-behaviour(gen_server).
|
|
-define(SERVER, ?MODULE).
|
|
|
|
%% ------------------------------------------------------------------
|
|
%% API Function Exports
|
|
%% ------------------------------------------------------------------
|
|
|
|
-export([start_link/0]).
|
|
|
|
%% ------------------------------------------------------------------
|
|
%% gen_server Function Exports
|
|
%% ------------------------------------------------------------------
|
|
|
|
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
|
|
|
|
%% ------------------------------------------------------------------
|
|
%% API Function Definitions
|
|
%% ------------------------------------------------------------------
|
|
|
|
start_link() ->
|
|
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
|
|
|
|
%% ------------------------------------------------------------------
|
|
%% gen_server Function Definitions
|
|
%% ------------------------------------------------------------------
|
|
|
|
init(Args) ->
|
|
{ok, Args}.
|
|
|
|
handle_call(_Request, _From, State) ->
|
|
{noreply, ok, State}.
|
|
|
|
handle_cast(_Msg, State) ->
|
|
{noreply, State}.
|
|
|
|
handle_info(_Info, State) ->
|
|
{noreply, State}.
|
|
|
|
terminate(_Reason, _State) ->
|
|
ok.
|
|
|
|
code_change(_OldVsn, State, _Extra) ->
|
|
{ok, State}.
|
|
|
|
%% ------------------------------------------------------------------
|
|
%% Internal Function Definitions
|
|
%% ------------------------------------------------------------------
|
|
|