fix(s3): fix typings

This commit is contained in:
Ilya Averyanov 2023-04-06 21:53:12 +03:00
parent 6fbc7dc822
commit 7eeba32619
3 changed files with 8 additions and 7 deletions

View File

@ -82,7 +82,7 @@
-type segment() :: {offset(), _Content :: binary()}.
-define(STORE_SEGMENT_TIMEOUT, 10000).
-define(ASSEMBLE_TIMEOUT, 60000).
-define(ASSEMBLE_TIMEOUT, 300000).
%%--------------------------------------------------------------------
%% API for app

View File

@ -47,7 +47,8 @@
upload_options := upload_options(),
bucket := string(),
headers := erlcloud_headers(),
url_expire_time := non_neg_integer()
url_expire_time := non_neg_integer(),
pool_type := pool_type()
}.
-type config() :: #{
@ -60,7 +61,7 @@
url_expire_time := pos_integer(),
access_key_id := string() | undefined,
secret_access_key := string() | undefined,
http_pool := ehttpc:pool_name(),
http_pool := http_pool(),
pool_type := pool_type(),
request_timeout := timeout() | undefined,
max_retries := non_neg_integer() | undefined
@ -268,7 +269,7 @@ request_fun(HttpPool, PoolType, MaxRetries) ->
ehttpc_request(HttpPool, Method, Request, Timeout, MaxRetries) ->
try timer:tc(fun() -> ehttpc:request(HttpPool, Method, Request, Timeout, MaxRetries) end) of
{Time, {ok, StatusCode, RespHeaders}} ->
?SLOG(debug, #{
?SLOG(info, #{
msg => "s3_ehttpc_request_ok",
status_code => StatusCode,
headers => RespHeaders,
@ -278,7 +279,7 @@ ehttpc_request(HttpPool, Method, Request, Timeout, MaxRetries) ->
{StatusCode, undefined}, headers_ehttpc_to_erlcloud_response(RespHeaders), undefined
}};
{Time, {ok, StatusCode, RespHeaders, RespBody}} ->
?SLOG(debug, #{
?SLOG(info, #{
msg => "s3_ehttpc_request_ok",
status_code => StatusCode,
headers => RespHeaders,

View File

@ -337,7 +337,7 @@ http_config(
SSLOpts = emqx_tls_lib:to_client_opts(maps:get(ssl, HTTPOpts)),
{tls, SSLOpts}
end,
NTransportOpts = emqx_misc:ipv6_probe(TransportOpts),
% NTransportOpts = emqx_misc:ipv6_probe(TransportOpts),
[
{host, Host},
{port, Port},
@ -346,7 +346,7 @@ http_config(
{pool_type, PoolType},
{pool_size, PoolSize},
{transport, Transport},
{transport_opts, NTransportOpts},
{transport_opts, TransportOpts},
{enable_pipelining, EnablePipelining}
].