View Source Vectoree.TreeSink behaviour (Vectoree v0.0.2)

A behaviour module for implementing a server, which reacts on changes on another part of the (global) tree. A sink is supposed to be registered on one or more paths on a TreeServer via the TreeServer.register_sink/1 function, at any time.

It is then supposed to do one thing:

  • React to notifications (casts) received from the hosting TreeServer via the handle_notify functions

Summary

Types

@type tree_map() :: %{required(tree_path()) => any()}
@type tree_path() :: Vectoree.TreePath.t()

Callbacks

Link to this callback

handle_notify(tree_path, tree_map, any)

View Source (optional)
@callback handle_notify(tree_path(), tree_map(), any()) :: any()