View Source grisp_updater_http behaviour (grisp_updater v2.1.0)

Summary

Callbacks

Link to this callback

http_connection_options/2

View Source (optional)
-callback http_connection_options(State :: term(), Url :: binary()) ->
                                     {ok,
                                      Host :: inet:hostname() | inet:ip_address(),
                                      Port :: inet:port_number(),
                                      Opts :: gun:opts(),
                                      State :: term()} |
                                     not_supported |
                                     {error, term()}.
-callback http_init(Options :: map()) -> {ok, State :: term()} | {error, REason :: term()}.
Link to this callback

http_request_options/4

View Source (optional)
-callback http_request_options(State :: term(), Method :: method(), Url :: binary(), Path :: binary()) ->
                                  {ok, Path :: binary(), Headers :: [{binary(), binary()}], State :: term()} |
                                  {error, term()}.

Functions

Link to this function

join_http_path(Base, Path)

View Source
Link to this function

source_cancel(State, ConnPid, StreamRef)

View Source
Link to this function

source_close(State, ConnPid)

View Source
Link to this function

source_handle(State, Msg)

View Source
Link to this function

source_open(State, Url, Opts)

View Source
Link to this function

source_stream(State, ConnPid, Path, Opts)

View Source
Link to this function

source_terminate(State, Reason)

View Source