SDK macros
Register hooks during init with compile-time checks.
| Macro | Purpose |
|---|---|
declare_plugin! | Exports featherfly_plugin_entry with name, version, init, and optional shutdown. |
hook! | Registers a lifecycle event handler during init. |
hook_config! | Registers a config.mutate handler that rewrites YAML before apply. |
hook_request! | Registers request.intercept or middleware.inject for a route prefix. |
route! | Registers a plugin HTTP route (GET/POST/PUT/PATCH/DELETE). |
hook_json! | Registers a JSON mutation handler for a route prefix during init. |
hook_cloudpanel! | Registers a CloudPanel command hook during init. |
Logging
unsafe { log_info(host, "message"); }