View Source grisp_updater_http behaviour (grisp_updater v2.1.1)

Summary

Callbacks

http_connection_options/2

(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()}.

http_init/1

-callback http_init(Options :: map()) -> {ok, State :: term()} | {error, REason :: term()}.

http_request_options/4

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

Functions

join_http_path(Base, Path)

source_cancel(State, ConnPid, StreamRef)

source_close(State, ConnPid)

source_handle(State, Msg)

source_init(Opts)

source_open(State, Url, Opts)

source_stream(State, ConnPid, Path, Opts)

source_terminate(State, Reason)