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:
Leonard Gram
2021-03-15 15:13:42 +01:00
parent 1e261642f4
commit 92e5213fca
2 changed files with 9 additions and 4 deletions
+5 -1
View File
@@ -33,7 +33,11 @@ var (
)
func init() {
registry.RegisterService(&manager{})
registry.Register(&registry.Descriptor{
Name: "manager",
Instance: &manager{},
InitPriority: registry.MediumHigh,
})
}
// Manager manages backend plugins.
+4 -3
View File
@@ -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
)