This commit is contained in:
anlicheng 2026-05-03 15:39:21 +08:00
parent bb5e0ddc17
commit 2e438cfaad
3 changed files with 4 additions and 6 deletions

View File

@ -49,7 +49,7 @@ resolve(IpPacket) when is_binary(IpPacket) ->
%%% Internal functions
%%%===================================================================
-spec resolve0(Packet :: binary()) -> {ok, Resp :: binary()} | {error, Reason :: any()}.
-spec resolve0(Packet :: #dns_message{}) -> {ok, Resp :: binary()} | {error, Reason :: any()}.
resolve0(QueryMsg = #dns_message{qc = 1, questions = [#dns_query{name = QName, type = QType, class = QClass}|_]}) ->
%%
case sdlan_hostname_regedit:lookup(QName) of

View File

@ -112,7 +112,7 @@ parse(Command = #command{stage = parse_arg, args = Args, arg_num = ArgNum, data
end.
%% redis数据返回格式化
-spec encode(tuple() | binary() | list()) -> iolist().
-spec encode(tuple() | binary() | integer() | list()) -> iolist().
encode({single_line, Arg}) when is_binary(Arg) ->
[<<$+>>, Arg, <<$\r, $\n>>];
encode({error, Arg}) when is_binary(Arg) ->

View File

@ -39,10 +39,8 @@ start_link() ->
%% restart strategy, maximum restart frequency and child
%% specifications.
-spec(init(Args :: term()) ->
{ok, {SupFlags :: {RestartStrategy :: supervisor:strategy(),
MaxR :: non_neg_integer(), MaxT :: non_neg_integer()},
[ChildSpec :: supervisor:child_spec()]}}
| ignore | {error, Reason :: term()}).
{ok, {SupFlags :: supervisor:sup_flags(), [ChildSpec :: supervisor:child_spec()]}}
| ignore).
init([]) ->
SupFlags = #{strategy => simple_one_for_one, intensity => 0, period => 1},