fix spec
This commit is contained in:
parent
bb5e0ddc17
commit
2e438cfaad
@ -49,7 +49,7 @@ resolve(IpPacket) when is_binary(IpPacket) ->
|
|||||||
%%% Internal functions
|
%%% 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}|_]}) ->
|
resolve0(QueryMsg = #dns_message{qc = 1, questions = [#dns_query{name = QName, type = QType, class = QClass}|_]}) ->
|
||||||
%% 查找是否是内置的域名
|
%% 查找是否是内置的域名
|
||||||
case sdlan_hostname_regedit:lookup(QName) of
|
case sdlan_hostname_regedit:lookup(QName) of
|
||||||
|
|||||||
@ -112,7 +112,7 @@ parse(Command = #command{stage = parse_arg, args = Args, arg_num = ArgNum, data
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
%% redis数据返回格式化
|
%% redis数据返回格式化
|
||||||
-spec encode(tuple() | binary() | list()) -> iolist().
|
-spec encode(tuple() | binary() | integer() | list()) -> iolist().
|
||||||
encode({single_line, Arg}) when is_binary(Arg) ->
|
encode({single_line, Arg}) when is_binary(Arg) ->
|
||||||
[<<$+>>, Arg, <<$\r, $\n>>];
|
[<<$+>>, Arg, <<$\r, $\n>>];
|
||||||
encode({error, Arg}) when is_binary(Arg) ->
|
encode({error, Arg}) when is_binary(Arg) ->
|
||||||
|
|||||||
@ -39,10 +39,8 @@ start_link() ->
|
|||||||
%% restart strategy, maximum restart frequency and child
|
%% restart strategy, maximum restart frequency and child
|
||||||
%% specifications.
|
%% specifications.
|
||||||
-spec(init(Args :: term()) ->
|
-spec(init(Args :: term()) ->
|
||||||
{ok, {SupFlags :: {RestartStrategy :: supervisor:strategy(),
|
{ok, {SupFlags :: supervisor:sup_flags(), [ChildSpec :: supervisor:child_spec()]}}
|
||||||
MaxR :: non_neg_integer(), MaxT :: non_neg_integer()},
|
| ignore).
|
||||||
[ChildSpec :: supervisor:child_spec()]}}
|
|
||||||
| ignore | {error, Reason :: term()}).
|
|
||||||
init([]) ->
|
init([]) ->
|
||||||
SupFlags = #{strategy => simple_one_for_one, intensity => 0, period => 1},
|
SupFlags = #{strategy => simple_one_for_one, intensity => 0, period => 1},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user