Initialization: backport of plugin manager initialization (#31988)

Manual backport of parts of #28377 to make sure services are initialized
in the right order.
This commit is contained in:
Leonard Gram
2021-03-15 14:59:07 +01:00
committed by GitHub
parent bb5747c636
commit 40b9285457
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
)