app/platform: move failover config initialization to platform (#21281)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5a4cac43a8
Коммит
e99eba33ff
@@ -201,20 +201,7 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
//
|
||||
// Step 1: Platform.
|
||||
if s.platform == nil {
|
||||
innerStore, err := config.NewFileStore("config.json", true)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to load config")
|
||||
}
|
||||
configStore, err := config.NewStoreFromBacking(innerStore, nil, false)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to load config")
|
||||
}
|
||||
|
||||
platformCfg := platform.ServiceConfig{
|
||||
ConfigStore: configStore,
|
||||
}
|
||||
|
||||
ps, sErr := platform.New(platformCfg, s.platformOptions...)
|
||||
ps, sErr := platform.New(platform.ServiceConfig{}, s.platformOptions...)
|
||||
if sErr != nil {
|
||||
return nil, errors.Wrap(sErr, "failed to initialize platform")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user