feat: add Load/Unload lifecycle hooks to PluginRegistration
Enables runtime plugin disable/enable without CMS restart. Load is called after registration succeeds; Unload on disable with a 30-second context deadline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
334d79b4bf
commit
601718a309
@ -1,6 +1,7 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
@ -38,6 +39,9 @@ type PluginRegistration struct {
|
||||
DirectoryExtensions func() *DirectoryExtensions
|
||||
MediaHooks MediaHooksProvider
|
||||
|
||||
Load func(deps ServiceDeps) error
|
||||
Unload func(ctx context.Context) error
|
||||
|
||||
Dependencies []Dependency
|
||||
Migrations func() fs.FS
|
||||
Version string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user