You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 regels
1.6 KiB

10 jaren geleden
  1. %%%-------------------------------------------------------------------
  2. %% @copyright {{copyright_holder}} ({{copyright_year}})
  3. %% @author {{author_name}} <{{author_email}}>
  4. %% @doc {{appid}} {{srvid}} OTP gen_server.
  5. %% @end
  6. %%%-------------------------------------------------------------------
  7. -module({{appid}}_{{srvid}}).
  8. -behaviour(gen_server).
  9. -include("{{appid}}_log.hrl").
  10. %% API
  11. -export([start_link/0
  12. ]).
  13. %% gen_server callbacks
  14. -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  15. terminate/2, code_change/3]).
  16. -record(state, {replaceme}).
  17. %%====================================================================
  18. %% API
  19. %%====================================================================
  20. start_link() ->
  21. gen_server:start_link(?MODULE, [], []).
  22. %%====================================================================
  23. %% gen_server callbacks
  24. %%====================================================================
  25. %% @private
  26. init([]) ->
  27. {ok, #state{}}.
  28. %% @private
  29. handle_call(Call, _From, State) ->
  30. ?WARN("Unexpected call ~p.", [Call]),
  31. {noreply, State}.
  32. %% @private
  33. handle_cast(Msg, State) ->
  34. ?WARN("Unexpected cast ~p", [Msg]),
  35. {noreply, State}.
  36. %% @private
  37. handle_info(Info, State) ->
  38. ?WARN("Unexpected info ~p", [Info]),
  39. {noreply, State}.
  40. %% @private
  41. terminate(_Reason, _State) ->
  42. ok.
  43. %% @private
  44. code_change(_OldVsn, State, _Extra) ->
  45. {ok, State}.
  46. %%====================================================================
  47. %% internal functions
  48. %%====================================================================