|
@@ -1,7 +1,7 @@
|
|
|
-module(n2o_heart).
|
|
|
-author('Maxim Sokhatsky').
|
|
|
-include_lib("n2o/include/wf.hrl").
|
|
|
--compile(export_all).
|
|
|
+-compile([export_all, nowarn_export_all]).
|
|
|
|
|
|
info({text,<<"PING">> = _Ping}=Message, Req, State) ->
|
|
|
wf:info(?MODULE,"PING: ~p",[Message]),
|
|
@@ -20,24 +20,24 @@ info({session,Operation,Key,Value},Req,State) -> {reply, case Operation of
|
|
|
set -> wf:session(Key,Value) end, Req, State};
|
|
|
|
|
|
% MQ protocol
|
|
|
-info({pub,Topic,Message}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({sub,Topic,Args}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({unsub,Topic}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({pub, _Topic, _Message} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({sub, _Topic, _Args} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({unsub, _Topic} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
|
|
|
% WF protocol
|
|
|
-info({q,Operation,Key}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({qc,Operation,Key}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({cookie,Operation,Key,Value}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({wire,Parameter}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({update,Target,Elements}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({insert_top,Target,Elements}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({insert_bottom,Target,Elements}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({q, _Operation, _Key} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({qc, _Operation, _Key} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({cookie, _Operation, _Key, _Value} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({wire, _Parameter} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({update, _Target, _Elements} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({insert_top, _Target, _Elements} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({insert_bottom, _Target, _Elements} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
|
|
|
% ASYNC protocol
|
|
|
-info({start,Handler}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({stop,Name}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({restart,Name}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({async,Name,Function}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
-info({flush}=Message,Req,State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({start, _Handler} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({stop, _Name} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({restart, _Name} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({async, _Name, _Function} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
+info({flush} = _Message, Req, State) -> {reply, <<"OK">>, Req, State};
|
|
|
|
|
|
-info(Message, Req, State) -> {unknown,Message, Req, State}.
|
|
|
+info(Message, Req, State) -> {unknown, Message, Req, State}.
|