summaryrefslogtreecommitdiff
path: root/inttest/erlc/src/foo.erl
blob: 33e6cfcb0e601821ec11c7871f5a9c5ab515754d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-module(foo).

-export([start_link/0,
         start_link/1,
         init/1,
         terminate/2,
         handle_info/2,
         handle_call/3,
         handle_cast/2,
         code_change/3]).

-behavior(gen_server).

-include("foo_core.hrl").
-include("foo_extra.hrl").
-include_lib("kernel/include/file.hrl").

-record(state, {node :: node()}).

start_link() -> start_link(undefined).

start_link(Args) ->
    gen_server:start_link({local, ?MODULE}, ?MODULE, Args, []).

init(_Args) -> {ok, #state{node=node()}}.

terminate(_Reason, _Data) -> ok.

handle_info(_Info, State) -> {noreply, State}.

handle_cast(_Msg, State) -> {noreply, State}.

handle_call(_Msg, _From, State) -> {reply, ok, State}.

code_change(_OldVsn, State, _Extra) -> {ok, State}.