app: add plugin-api/cluster interface provider (#19720)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-03-21 21:38:48 +03:00
коммит произвёл GitHub
родитель dae769221d
Коммит 42125bff4a
3 изменённых файлов: 91 добавлений и 11 удалений

Просмотреть файл

@@ -93,6 +93,7 @@ const (
ConfigKey ServiceKey = "config"
LicenseKey ServiceKey = "license"
FilestoreKey ServiceKey = "filestore"
ClusterKey ServiceKey = "cluster"
)
type Server struct {
@@ -140,6 +141,7 @@ type Server struct {
Jobs *jobs.JobServer
clusterLeaderListeners sync.Map
clusterWrapper *clusterWrapper
licenseValue atomic.Value
clientLicenseValue atomic.Value
@@ -363,11 +365,17 @@ func NewServer(options ...Option) (*Server, error) {
srv: s,
}
s.clusterWrapper = &clusterWrapper{
srv: s,
}
serviceMap := map[ServiceKey]interface{}{
ConfigKey: s.configStore,
LicenseKey: s.licenseWrapper,
FilestoreKey: s.filestore,
ClusterKey: s.clusterWrapper,
}
// Step 8: Initialize products.
// Depends on s.httpService.
for name, initializer := range products {