Behaviours: gen_server.
trigger_action() = {sproc, khepri_path:native_path()} | {apply, {module(), atom(), list()}} | {send, pid(), any()}
The type of action associated with a trigger.
It can be the following actions:sproc: the stored procedure pointed to by the given path will be
executedapply, the function described by the given module/function/arguments
tuple will be executedsend: a message will be sent to the specified PID with the event
details and the given termtrigger_descriptor/0.
trigger_descriptor() = #khepri_trigger{type = tree | process, store_id = khepri:store_id(), trigger_id = khepri:trigger_id(), event = map(), action = map()}
Descriptor of the trigger used as an argument to the trigger action.
The descriptor contains all the properties of a specific instance of that trigger.
When the action is a stored procedure or an MFA tuple, the descriptor is appended to the list of arguments.
When the action is a PID, the descriptor is send to the PID as a standalone message. Theaction properties map will contain the Priv element of the
send tuple under the priv field.
trigger_exec_loc() = leader | {member, node()} | all_members
Where to execute the triggered action.
It supports the following locations:leader: the action is executed on the leader node at the time the
action is triggered.{member, Member}: the action is executed on the given node if it is a
member of the cluster, or the leader otherwise.all_members: the action is executed on all members of the
cluster.triggered_action() = {sproc, horus:horus_fun()} | {apply, {module(), atom(), list()}} | {send, pid(), any()}
The action associated with a trigger once it is triggered.
It can be the following actions:sproc: the stored procedure (extracted from the path given to the
trigger registration) is executedapply: the function described by the given module/function/arguments
tuple is executedsend: a message is sent to the specified PID with the event details
and the given term| start_link/0 | |
| handle_triggered_actions/2 | |
| init/1 | |
| handle_call/3 | |
| handle_cast/2 | |
| handle_info/2 | |
| terminate/2 | |
| code_change/3 |
start_link() -> any()
handle_triggered_actions(StoreId, TriggeredActions) -> any()
init(X1) -> any()
handle_call(Request, From, State) -> any()
handle_cast(Request, State) -> any()
handle_info(Msg, State) -> any()
terminate(Reason, State) -> any()
code_change(OldVsn, State, Extra) -> any()
Generated by EDoc