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
TreeServer
at a path via theTreeServer.mount_source/1
function, normally during thec:init/1
callback. - registered on one or more paths on a
TreeServer
via theTreeServer.register_sink/1
function, 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_query
functions in this module) - Notify the hosting
TreeServer
about updates in the local tree via theTreeServer.notify/2
function - React to notifications (casts) received from the hosting
TreeServer
via thehandle_notify
functions
Summary
Types
@type tree_path() :: Vectoree.TreePath.t()
Callbacks
Link to this callback