Defines a plugin and runs its long-lived oll session.
Build a plugin with new!/2, register each action with action/4, then pass
it to run!/1 from the escript entry point.
Summary
Functions
Registers an action handler.
Creates a plugin with its permanent ID and implementation version.
Runs the plugin until oll closes the session or the parent-liveness pipe.
Types
@type handler() :: (Onelastleaf.PluginSDK.ActionContext.t(), [String.t()] -> Onelastleaf.PluginSDK.ActionResult.t())
Functions
Registers an action handler.
Action names must be unique, nonempty UTF-8 strings. A handler receives the
per-job action context and ordered string arguments, and must return an
Onelastleaf.PluginSDK.ActionResult.
Creates a plugin with its permanent ID and implementation version.
The ID must be a valid dotted plugin ID such as "example.echo". The
version is reported to oll and must be nonempty UTF-8.
@spec run!(t()) :: :ok
Runs the plugin until oll closes the session or the parent-liveness pipe.
oll supplies the gRPC endpoint in OLL_PLUGIN_ENDPOINT. This function
blocks for the lifetime of the process and raises on setup or protocol
failures. It returns :ok after a graceful oll shutdown.