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,
|
webSocketManager types.WebSocketManager,
|
||||||
apiManager types.ApiManager,
|
apiManager types.ApiManager,
|
||||||
) {
|
) {
|
||||||
for _, plug := range manager.plugins {
|
for path, plug := range manager.plugins {
|
||||||
plug.Start(types.PluginManagers{
|
err := plug.Start(types.PluginManagers{
|
||||||
SessionManager: sessionManager,
|
SessionManager: sessionManager,
|
||||||
WebSocketManager: webSocketManager,
|
WebSocketManager: webSocketManager,
|
||||||
ApiManager: apiManager,
|
ApiManager: apiManager,
|
||||||
LoadServiceFromPlugin: manager.LookupService,
|
LoadServiceFromPlugin: manager.LookupService,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
manager.logger.Err(err).Str("plugin", path).Msg("plugin start")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
type Plugin interface {
|
type Plugin interface {
|
||||||
Name() string
|
Name() string
|
||||||
Config() PluginConfig
|
Config() PluginConfig
|
||||||
Start(PluginManagers)
|
Start(PluginManagers) error
|
||||||
Shutdown() error
|
Shutdown() error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user