Skip to content

Instantly share code, notes, and snippets.

@eproxus
Created October 10, 2019 12:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eproxus/7586b3db3364960d428c712a6d6ab82a to your computer and use it in GitHub Desktop.
Save eproxus/7586b3db3364960d428c712a6d6ab82a to your computer and use it in GitHub Desktop.
-module().
-behavior(gen_server).
% API
-export([start_link/0]).
% Callbacks
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
%--- API -----------------------------------------------------------------------
start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, undefined, []).
%--- Callbacks -----------------------------------------------------------------
init(undefined) -> {ok, undefined}.
handle_call(Request, From, _State) -> error({unknown_request, Request, From}).
handle_cast(Request, _State) -> error({unknown_cast, Request}).
handle_info(Info, _State) -> error({unknown_info, Info}).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment