grisp_updater_sink behaviour (grisp_updater v2.3.0)

View Source

Summary

Callbacks

Deliver a data chunk. Return {abort, Reason} to stop the stream.

Final data fragment and end-of-stream notification.

Notify the sink of a stream error; implementations should cleanup resources.

Callbacks

sink_data(StreamRef, Params, Data)

-callback sink_data(StreamRef :: reference(), Params :: term(), Data :: binary()) ->
                       ok | {abort, Reason :: term()}.

Deliver a data chunk. Return {abort, Reason} to stop the stream.

sink_done(StreamRef, Params, Data)

-callback sink_done(StreamRef :: reference(), Params :: term(), Data :: binary()) -> ok.

Final data fragment and end-of-stream notification.

sink_error(StreamRef, Params, Reason)

-callback sink_error(StreamRef :: reference(), Params :: term(), Reason :: term()) -> ok.

Notify the sink of a stream error; implementations should cleanup resources.