View Source partisan_plumtree_broadcast_handler behaviour (partisan v5.0.0-beta.21)
This module defines a behaviour to customise the implementation for the operations performed by the partisan_plumtree_broadcast server.
  
  callbacks
  
  Callbacks
The behaviour defines the following callbacks:broadcast_data/1- must return a two-tuple of message id and payload from a given broadcast. Where the broadcasted message is application-specific.broadcast_channel/1(optional) - Must return the channel to be used when broadcasting data associate with this handler. Seepartisan_plumtree_broadcast:broadcast/2.
Link to this section Summary
Link to this section Callbacks
-callback broadcast_channel() -> partisan:channel().
-callback broadcast_data(any()) -> {any(), any()}.
      -callback exchange(node()) -> {ok, pid()} | {error, term()} | ignore.
      -callback graft(any()) -> stale | {ok, any()} | {error, any()}.
      -callback is_stale(any()) -> boolean().
      -callback merge(any(), any()) -> boolean().