DripDrop.Hooks.Evaluator (DripDrop v0.1.0)

Copy Markdown View Source

Evaluates Elixir module hooks and HTTP hooks with bounded runtime.

Summary

Functions

Resolves a hook condition against a dispatch context.

Renders and executes a configured HTTP hook.

Functions

resolve(condition, context)

@spec resolve(map(), map()) :: {:ok, term()} | {:error, term()}

Resolves a hook condition against a dispatch context.

run_http_hook(hook, vars, opts \\ [])

@spec run_http_hook(Ecto.Schema.t(), map(), keyword()) ::
  {:ok, term()} | {:error, term()}

Renders and executes a configured HTTP hook.