event_filter() = tree_event_filter()
An event filter.
The following event filters are supported:tree_event_filter()
priority() = integer()
An event filter priority.
This is an integer to prioritize event filters: the greater the priority, the more it is prioritized. Negative integers are allowed.
The default priority is 0.tree_event_filter() = #evf_tree{path = khepri_path:native_pattern(), props = khepri_evf:tree_event_filter_props()}
A tree event filter.
It takes a path pattern to monitor and optionally properties.tree_event_filter_props() = #{on_actions => [create | update | delete], priority => khepri_evf:priority()}
Tree event filter properties.
The properties are:on_actions
: a list of actions to filter among create
, update
and
delete
; the default is to react to all of them.priority
: a priority()
tree/1 | Constructs a tree event filter. |
tree/2 | Constructs a tree event filter. |
wrap/1 | Automatically detects the event filter type and ensures it is wrapped in one of the internal types. |
get_priority/1 | Returns the priority of the event filter. |
set_priority/2 | Sets the priority of the event filter. |
tree(PathPattern) -> EventFilter
PathPattern = khepri_path:pattern() | string()
EventFilter = tree_event_filter()
Constructs a tree event filter.
See also: tree/2.
tree(PathPattern, Props) -> EventFilter
PathPattern = khepri_path:pattern() | string()
Props = tree_event_filter_props()
EventFilter = tree_event_filter()
Constructs a tree event filter.
See also: tree_event_filter().
wrap(Input) -> EventFilter
Input = event_filter() | khepri_path:pattern() | string()
EventFilter = event_filter()
Input
: an already created event filter, or any term which can be
automatically converted to an event filter.
returns: the created event filter.
Automatically detects the event filter type and ensures it is wrapped in one of the internal types.
get_priority(EventFilter) -> Priority
EventFilter = event_filter()
Priority = priority()
EventFilter
: the event filter to update.
returns: the priority.
Returns the priority of the event filter.
set_priority(EventFilter, Priority) -> EventFilter
EventFilter = event_filter()
Priority = priority()
EventFilter
: the event filter to update.
Priority
: the new priority.
returns: the updated event filter.
Sets the priority of the event filter.
Generated by EDoc