Module khepri_event_handler

Khepri event handling server.

Behaviours: gen_server.

Description

Khepri event handling server.

Data Types

trigger_action()

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: The action will get a trigger desccriptor as argument to describe a specific execution of that trigger. See trigger_descriptor/0.

trigger_descriptor()

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. The action properties map will contain the Priv element of the send tuple under the priv field.

trigger_exec_loc()

trigger_exec_loc() = leader | {member, node()} | all_members

Where to execute the triggered action.

It supports the following locations:

triggered_action()

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:

Function Index

start_link/0
handle_triggered_actions/2
init/1
handle_call/3
handle_cast/2
handle_info/2
terminate/2
code_change/3

Function Details

start_link/0

start_link() -> any()

handle_triggered_actions/2

handle_triggered_actions(StoreId, TriggeredActions) -> any()

init/1

init(X1) -> any()

handle_call/3

handle_call(Request, From, State) -> any()

handle_cast/2

handle_cast(Request, State) -> any()

handle_info/2

handle_info(Msg, State) -> any()

terminate/2

terminate(Reason, State) -> any()

code_change/3

code_change(OldVsn, State, Extra) -> any()


Generated by EDoc