aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-10-31 11:45:04 +0100
committerLoïc Hoguin <[email protected]>2018-10-31 14:11:45 +0100
commit473e3fb82bd56a984dcf8936a51e3fd8affcb8f4 (patch)
treec9f126c7117f271b4aa8c739bb5178b9671c9d10 /src/cowboy_http.erl
parenta8335c63df31f21d88e9d7d1f2b64d32a674cd7a (diff)
downloadcowboy-473e3fb82bd56a984dcf8936a51e3fd8affcb8f4.tar.gz
cowboy-473e3fb82bd56a984dcf8936a51e3fd8affcb8f4.tar.bz2
cowboy-473e3fb82bd56a984dcf8936a51e3fd8affcb8f4.zip
Improve a few types, including cowboy_req:req()
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r--src/cowboy_http.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index a6da5c6..fff4e5b 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -39,10 +39,14 @@
max_keepalive => non_neg_integer(),
max_method_length => non_neg_integer(),
max_request_line_length => non_neg_integer(),
+ metrics_callback => cowboy_metrics_h:metrics_callback(),
middlewares => [module()],
+ proxy_header => boolean(),
request_timeout => timeout(),
shutdown_timeout => timeout(),
- stream_handlers => [module()]
+ stream_handlers => [module()],
+ tracer_callback => cowboy_tracer_h:tracer_callback(),
+ tracer_match_specs => cowboy_tracer_h:tracer_match_specs()
}.
-export_type([opts/0]).
@@ -56,7 +60,7 @@
path = undefined :: binary(),
qs = undefined :: binary(),
version = undefined :: cowboy:http_version(),
- headers = undefined :: map() | undefined, %% @todo better type than map()
+ headers = undefined :: cowboy:http_headers() | undefined,
name = undefined :: binary() | undefined
}).
@@ -99,7 +103,7 @@
socket :: inet:socket(),
transport :: module(),
proxy_header :: undefined | ranch_proxy_header:proxy_info(),
- opts = #{} :: map(),
+ opts = #{} :: cowboy:opts(),
%% Remote address and port for the connection.
peer = undefined :: {inet:ip_address(), inet:port_number()},