MishkaPay.Helpers.Plugins (Mishka Pay v0.0.1)

Copy Markdown View Source

Runs the host plugins of a mishka_installer event so that none of them can take the caller down: in a task under MishkaPay.TaskSupervisor, not linked to the caller, within a time limit. Used for the keys plugins (MishkaPay.Credentials) and the checkout gate (MishkaPay.checkout/1).

Summary

Functions

The event's answer to state, or why there is none: :cannot_run (a plugin is registered but not loaded), :raised, :exited (an exit or throw, logged with its exit) or :timeout.

Types

failure()

@type failure() :: :cannot_run | :raised | :exited | :timeout

Functions

call(event, state, timeout)

@spec call(String.t(), term(), timeout()) :: {:ok, term()} | {:error, failure()}

The event's answer to state, or why there is none: :cannot_run (a plugin is registered but not loaded), :raised, :exited (an exit or throw, logged with its exit) or :timeout.