%%% 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.