khepri_evf (khepri v0.6.0)
Link to this section Summary
Functions
Returns the priority of the event filter.
Sets the priority of the event filter.
Constructs a tree event filter.
See also: tree/2.
Constructs a tree event filter.
See also: tree_event_filter().
Automatically detects the event filter type and ensures it is wrapped in one of the internal types.
Link to this section Types
Link to this type
event_filter/0
-type event_filter() :: tree_event_filter().
An event filter.
The following event filters are supported:- Tree event filter (
tree_event_filter()
Link to this type
priority/0
-type 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.
Link to this type
tree_event_filter/0
-type tree_event_filter() :: #evf_tree{}.
A tree event filter.
It takes a path pattern to monitor and optionally properties.
Link to this type
tree_event_filter_props/0
-type 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 amongcreate
,update
anddelete
; the default is to react to all of them.priority
: apriority()
Link to this section Functions
Link to this function
get_priority(EventFilter)
-spec get_priority(EventFilter) -> Priority when EventFilter :: event_filter(), Priority :: priority().
Link to this function
set_priority(EventFilter, Priority)
-spec set_priority(EventFilter, Priority) -> EventFilter when EventFilter :: event_filter(), Priority :: priority().
Link to this function
tree(PathPattern)
-spec tree(PathPattern) -> EventFilter when PathPattern :: khepri_path:pattern() | string(), EventFilter :: tree_event_filter().
See also: tree/2.
Link to this function
tree(PathPattern, Props)
-spec tree(PathPattern, Props) -> EventFilter when PathPattern :: khepri_path:pattern() | string(), Props :: tree_event_filter_props(), EventFilter :: tree_event_filter().
See also: tree_event_filter().
Link to this function
wrap(Input)
-spec wrap(Input) -> EventFilter when Input :: event_filter() | khepri_path:pattern() | string(), EventFilter :: event_filter().