buoy_client (buoy v0.2.6)
View SourceSummary
Types
-type buoy_resp() :: #buoy_resp{state :: body | done, body :: undefined | binary(), content_length :: undefined | non_neg_integer() | chunked, headers :: undefined | [binary()], reason :: undefined | binary(), status_code :: undefined | 100..505}.
-type buoy_url() :: #buoy_url{host :: host(), hostname :: hostname(), path :: path(), port :: inet:port_number(), protocol :: protocol_http()}.
-type host() :: binary().
-type hostname() :: binary().
-type path() :: binary().
-type protocol_http() :: http | https.
-type state() :: #state{bin_patterns :: tuple(), buffer :: binary(), queue :: queue:queue(), request_id :: non_neg_integer(), response :: undefined | buoy_resp()}.
Functions
-spec handle_request(term(), state()) -> {ok, non_neg_integer(), iodata(), state()}.
-spec init(undefined) -> {ok, state()}.
-spec setup(inet:socket(), state()) -> {ok, state()}.
-spec terminate(state()) -> ok.