Initialization: backport of plugin manager initialization (#31988)
Manual backport of parts of #28377 to make sure services are initialized
in the right order.
(cherry picked from commit 40b9285457)
This commit is contained in:
@@ -33,7 +33,11 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
registry.RegisterService(&manager{})
|
||||
registry.Register(®istry.Descriptor{
|
||||
Name: "manager",
|
||||
Instance: &manager{},
|
||||
InitPriority: registry.MediumHigh,
|
||||
})
|
||||
}
|
||||
|
||||
// Manager manages backend plugins.
|
||||
|
||||
@@ -114,7 +114,8 @@ func IsDisabled(srv Service) bool {
|
||||
type Priority int
|
||||
|
||||
const (
|
||||
High Priority = 100
|
||||
Medium Priority = 50
|
||||
Low Priority = 0
|
||||
High Priority = 100
|
||||
MediumHigh Priority = 75
|
||||
Medium Priority = 50
|
||||
Low Priority = 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user