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
|
package plugin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
@ -38,6 +39,9 @@ type PluginRegistration struct {
|
|||||||
DirectoryExtensions func() *DirectoryExtensions
|
DirectoryExtensions func() *DirectoryExtensions
|
||||||
MediaHooks MediaHooksProvider
|
MediaHooks MediaHooksProvider
|
||||||
|
|
||||||
|
Load func(deps ServiceDeps) error
|
||||||
|
Unload func(ctx context.Context) error
|
||||||
|
|
||||||
Dependencies []Dependency
|
Dependencies []Dependency
|
||||||
Migrations func() fs.FS
|
Migrations func() fs.FS
|
||||||
Version string
|
Version string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user