View Source Vectoree.TreeProcessor behaviour (Vectoree v0.0.2)
A behaviour module for implementing a server, which maintains a local tree (key-value map) as its internal state and reacts on changes on another part of the (global) tree. A processor is supposed to be
- mounted on a
TreeServerat a path via theTreeServer.mount_source/1function, normally during thec:init/1callback. - registered on one or more paths on a
TreeServervia theTreeServer.register_sink/1function, at any time.
It is then supposed to do three things:
- Reply to query requests by returning the local tree in a mounted state (done
by the
handle_queryfunctions in this module) - Notify the hosting
TreeServerabout updates in the local tree via theTreeServer.notify/2function - React to notifications (casts) received from the hosting
TreeServervia thehandle_notifyfunctions
Summary
Types
@type tree_path() :: Vectoree.TreePath.t()
Callbacks
Link to this callback