expose nodeconf config getter
This commit is contained in:
parent
067bf797dd
commit
3809b20d50
@ -10,7 +10,7 @@ const (
|
|||||||
NodeTypeCoordinator NodeType = "coordinator"
|
NodeTypeCoordinator NodeType = "coordinator"
|
||||||
)
|
)
|
||||||
|
|
||||||
type configGetter interface {
|
type ConfigGetter interface {
|
||||||
GetNodes() []NodeConfig
|
GetNodes() []NodeConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ func (n *Node) Capacity() float64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *service) Init(a *app.App) (err error) {
|
func (s *service) Init(a *app.App) (err error) {
|
||||||
nodesConf := a.MustComponent("config").(configGetter).GetNodes()
|
nodesConf := a.MustComponent("config").(ConfigGetter).GetNodes()
|
||||||
s.accountId = a.MustComponent(commonaccount.CName).(commonaccount.Service).Account().PeerId
|
s.accountId = a.MustComponent(commonaccount.CName).(commonaccount.Service).Account().PeerId
|
||||||
|
|
||||||
fileConfig := &configuration{
|
fileConfig := &configuration{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user