chore(ft): fix typing issues
This commit is contained in:
parent
2c9cd1397d
commit
228bf1a0ce
|
@ -184,9 +184,9 @@ on_init(PacketId, Msg, Transfer) ->
|
||||||
ok ->
|
ok ->
|
||||||
emqx_ft_responder:ack(PacketKey, ok);
|
emqx_ft_responder:ack(PacketKey, ok);
|
||||||
% Storage operation started, packet will be acked by the responder
|
% Storage operation started, packet will be acked by the responder
|
||||||
{async, Pid} ->
|
% {async, Pid} ->
|
||||||
ok = emqx_ft_responder:kickoff(PacketKey, Pid),
|
% ok = emqx_ft_responder:kickoff(PacketKey, Pid),
|
||||||
ok;
|
% ok;
|
||||||
%% Storage operation failed, ack through the responder
|
%% Storage operation failed, ack through the responder
|
||||||
{error, _} = Error ->
|
{error, _} = Error ->
|
||||||
emqx_ft_responder:ack(PacketKey, Error)
|
emqx_ft_responder:ack(PacketKey, Error)
|
||||||
|
@ -227,9 +227,9 @@ on_segment(PacketId, Msg, Transfer, Offset, Checksum) ->
|
||||||
case store_segment(Transfer, Segment) of
|
case store_segment(Transfer, Segment) of
|
||||||
ok ->
|
ok ->
|
||||||
emqx_ft_responder:ack(PacketKey, ok);
|
emqx_ft_responder:ack(PacketKey, ok);
|
||||||
{async, Pid} ->
|
% {async, Pid} ->
|
||||||
ok = emqx_ft_responder:kickoff(PacketKey, Pid),
|
% ok = emqx_ft_responder:kickoff(PacketKey, Pid),
|
||||||
ok;
|
% ok;
|
||||||
{error, _} = Error ->
|
{error, _} = Error ->
|
||||||
emqx_ft_responder:ack(PacketKey, Error)
|
emqx_ft_responder:ack(PacketKey, Error)
|
||||||
end
|
end
|
||||||
|
@ -251,8 +251,8 @@ on_fin(PacketId, Msg, Transfer, Checksum) ->
|
||||||
with_responder(FinPacketKey, Callback, ?ASSEMBLE_TIMEOUT, fun() ->
|
with_responder(FinPacketKey, Callback, ?ASSEMBLE_TIMEOUT, fun() ->
|
||||||
case assemble(Transfer) of
|
case assemble(Transfer) of
|
||||||
%% Assembling completed, ack through the responder right away
|
%% Assembling completed, ack through the responder right away
|
||||||
ok ->
|
% ok ->
|
||||||
emqx_ft_responder:ack(FinPacketKey, ok);
|
% emqx_ft_responder:ack(FinPacketKey, ok);
|
||||||
%% Assembling started, packet will be acked by the responder
|
%% Assembling started, packet will be acked by the responder
|
||||||
{async, Pid} ->
|
{async, Pid} ->
|
||||||
ok = emqx_ft_responder:kickoff(FinPacketKey, Pid),
|
ok = emqx_ft_responder:kickoff(FinPacketKey, Pid),
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
%% API
|
%% API
|
||||||
%% -------------------------------------------------------------------
|
%% -------------------------------------------------------------------
|
||||||
|
|
||||||
-spec start(key(), timeout(), respfun()) -> startlink_ret().
|
-spec start(key(), respfun(), timeout()) -> startlink_ret().
|
||||||
start(Key, RespFun, Timeout) ->
|
start(Key, RespFun, Timeout) ->
|
||||||
emqx_ft_responder_sup:start_child(Key, RespFun, Timeout).
|
emqx_ft_responder_sup:start_child(Key, RespFun, Timeout).
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,7 @@
|
||||||
-define(MANIFEST, "MANIFEST.json").
|
-define(MANIFEST, "MANIFEST.json").
|
||||||
-define(SEGMENT, "SEG").
|
-define(SEGMENT, "SEG").
|
||||||
|
|
||||||
%% TODO
|
-type storage() :: emqx_ft_storage:storage().
|
||||||
-type storage() :: emqx_config:config().
|
|
||||||
|
|
||||||
%% Store manifest in the backing filesystem.
|
%% Store manifest in the backing filesystem.
|
||||||
%% Atomic operation.
|
%% Atomic operation.
|
||||||
|
|
Loading…
Reference in New Issue