grapevine v0.2.0 Grapevine.Handler behaviour View Source

This module is the interface for custom handlers.

The handler can be used to process new updates and detect new nodes added to the network.

Link to this section Summary

Callbacks

The push callback receives all the updates sent. The callback can be used to process the updates, filter the updates and ignore. The ignored or filtered updates won't be process by the instance, i.e. the feedback step won't include these updates

Link to this section Callbacks

Link to this callback

push(arg0, arg1) View Source
push(Grapevine.Updates.t(), Grapevine.Updates.t()) ::
  :ok | {:ok, Grapevine.Updates.t()} | {:reset, Grapevine.Updates.t()} | :ignore

The push callback receives all the updates sent. The callback can be used to process the updates, filter the updates and ignore. The ignored or filtered updates won't be process by the instance, i.e. the feedback step won't include these updates