fix spec
This commit is contained in:
parent
bb5e0ddc17
commit
2e438cfaad
@ -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
|
||||
|
||||
@ -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) ->
|
||||
|
||||
@ -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},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user