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
|
%%% Copyright (c) 2017, NORDUnet A/S.
%%% See LICENSE for licensing information.
-module(merge_fetch_fetch).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, terminate/2, handle_cast/2, handle_info/2,
code_change/3]).
start_link(Args) ->
gen_server:start_link(?MODULE, Args, []).
init({Name, _Address}) ->
lager:info("~p:~p: starting", [?MODULE, Name]),
{ok, []}.
%% TODO: if we crash here, we restart all of fetch -- spawn child proc
%% for the actual fetching?
handle_call(stop, _From, State) ->
{stop, normal, stopped, State}.
handle_cast(_Request, State) ->
{noreply, State}.
handle_info(_Info, State) ->
{noreply, State}.
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
terminate(_Reason, _State) ->
lager:info("~p terminating", [?MODULE]),
ok.
|