product/hooks: hooks service no longer requires channels service start (#21861)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8d90c7042f
Коммит
f31380f577
@@ -325,10 +325,6 @@ type hooksService struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *hooksService) RegisterHooks(productID string, hooks any) error {
|
func (s *hooksService) RegisterHooks(productID string, hooks any) error {
|
||||||
if s.ch.pluginsEnvironment == nil {
|
|
||||||
return errors.New("could not find plugins environment")
|
|
||||||
}
|
|
||||||
|
|
||||||
return s.ch.srv.hooksManager.AddProduct(productID, hooks)
|
return s.ch.srv.hooksManager.AddProduct(productID, hooks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ type ConfigService interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HooksService is the API for adding exiting plugin hooks to the server so that they can be called as
|
// HooksService is the API for adding exiting plugin hooks to the server so that they can be called as
|
||||||
// they were. This Service is required to be used after the products start. Otherwise it will return an error.
|
// they were. This Service is required to be accessed after the channels product initialized.
|
||||||
//
|
//
|
||||||
// The service shall be registered via app.HooksKey service key.
|
// The service shall be registered via app.HooksKey service key.
|
||||||
type HooksService interface {
|
type HooksService interface {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user