Exd v0.1.31 Exd.Plugin behaviour View Source

Defines a UDF plugin

Link to this section Summary

Functions

Finds plugin

Check if plugin is stateful

Callbacks

Invoked for all rows passing though the plugin

Invoked when the server is started for stateful plugins

Link to this section Functions

Link to this function find(name) View Source
find(binary() | term()) :: {:ok, term()} | {:error, :not_found}

Finds plugin

Check if plugin is stateful

Link to this section Callbacks

Link to this callback evaluate(records, state) View Source
evaluate(records :: [record], state) ::
  {:ok, new_state} | {:stop, reason, new_state}
when state: map(), new_state: map(), reason: term(), record: Exd.record()

Invoked for all rows passing though the plugin

Returns the transformed values as well as the updated state

Link to this callback init(keyword) View Source
init(keyword()) :: {:ok, state :: map()}

Invoked when the server is started for stateful plugins