MSP-634 remove instanceUuid from local config
This commit is contained in:
1 parent
894781c727
commit
b0d60603bb
2 files changed
+8
-26
No files matched your search
+8
-16
@@ -16,29 +16,21 @@ import (
|
||||
)
|
||||
|
||||
type Assembly struct {
|
||||
boot *bootstrap.Bootstrap
|
||||
db *dbrx.Client
|
||||
server *grpc.Server
|
||||
logger *log.Adapter
|
||||
instanceUuid string
|
||||
boot *bootstrap.Bootstrap
|
||||
db *dbrx.Client
|
||||
server *grpc.Server
|
||||
logger *log.Adapter
|
||||
}
|
||||
|
||||
func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
|
||||
dbCli := dbrx.New(dbx.WithMigration(boot.MigrationsDir))
|
||||
server := grpc.NewServer()
|
||||
|
||||
localConfig := conf.Local{}
|
||||
err := boot.App.Config().Read(&localConfig)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "read local config")
|
||||
}
|
||||
|
||||
return &Assembly{
|
||||
boot: boot,
|
||||
db: dbCli,
|
||||
server: server,
|
||||
logger: boot.App.Logger(),
|
||||
instanceUuid: localConfig.InstanceUuid,
|
||||
boot: boot,
|
||||
db: dbCli,
|
||||
server: server,
|
||||
logger: boot.App.Logger(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/integration-system/isp-kit/bootstrap"
|
||||
)
|
||||
|
||||
type Local struct {
|
||||
*bootstrap.LocalConfig
|
||||
InstanceUuid string `valid:"required"`
|
||||
}
|
||||
Reference in new issue
Block a user