grisp_updater_progress behaviour (grisp_updater v2.3.0)
View SourceSummary
Callbacks
Successful completion notification.
Fatal error: finalize and notify the caller.
Initialize a progress reporter. The returned State is passed to all progress_* callbacks.
Called frequently as the update proceeds. Should return quickly.
Optional warning hook for non-fatal conditions.
Types
-type statistics() :: #{start_time := non_neg_integer(), blocks_total := non_neg_integer(), blocks_checked := non_neg_integer(), blocks_loading := non_neg_integer(), blocks_loaded := non_neg_integer(), blocks_retries := non_neg_integer(), blocks_written := non_neg_integer(), data_total := non_neg_integer(), data_checked := non_neg_integer(), data_loaded := non_neg_integer(), data_skipped := non_neg_integer(), data_written := non_neg_integer()}.
Callbacks
-callback progress_done(State :: term(), Statistics :: statistics()) -> ok.
Successful completion notification.
-callback progress_error(State :: term(), Statistics :: statistics(), Reason :: term(), Msg :: binary() | undefined) -> ok.
Fatal error: finalize and notify the caller.
Initialize a progress reporter. The returned State is passed to all progress_* callbacks.
-callback progress_update(State :: term(), Statistics :: statistics()) -> {ok, State :: term()}.
Called frequently as the update proceeds. Should return quickly.
-callback progress_warning(State :: term(), Reason :: term(), Msg :: binary() | undefined) -> {ok, State :: term()}.
Optional warning hook for non-fatal conditions.