mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add error to plugin start.
This commit is contained in:
parent
61059c9b3c
commit
ae7e6dc2d7
@ -94,13 +94,15 @@ func (manager *ManagerCtx) Start(
|
||||
webSocketManager types.WebSocketManager,
|
||||
apiManager types.ApiManager,
|
||||
) {
|
||||
for _, plug := range manager.plugins {
|
||||
plug.Start(types.PluginManagers{
|
||||
for path, plug := range manager.plugins {
|
||||
err := plug.Start(types.PluginManagers{
|
||||
SessionManager: sessionManager,
|
||||
WebSocketManager: webSocketManager,
|
||||
ApiManager: apiManager,
|
||||
LoadServiceFromPlugin: manager.LookupService,
|
||||
})
|
||||
|
||||
manager.logger.Err(err).Str("plugin", path).Msg("plugin start")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Config() PluginConfig
|
||||
Start(PluginManagers)
|
||||
Start(PluginManagers) error
|
||||
Shutdown() error
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user