mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
nodeconf interfaces
This commit is contained in:
parent
4ea2953045
commit
18db36a70a
11 changed files with 233 additions and 540 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"github.com/anytypeio/any-sync/app"
|
||||
"github.com/anytypeio/any-sync/commonspace/object/accountdata"
|
||||
"github.com/anytypeio/any-sync/nodeconf"
|
||||
"github.com/anytypeio/any-sync/nodeconf/nodeconfstore"
|
||||
"github.com/anytypeio/any-sync/util/crypto"
|
||||
)
|
||||
|
||||
|
@ -47,8 +48,8 @@ func (s *AccountTestService) Account() *accountdata.AccountKeys {
|
|||
return s.acc
|
||||
}
|
||||
|
||||
func (s *AccountTestService) NodeConf(addrs []string) nodeconf.NodeConfig {
|
||||
return nodeconf.NodeConfig{
|
||||
func (s *AccountTestService) NodeConf(addrs []string) nodeconfstore.NodeConfig {
|
||||
return nodeconfstore.NodeConfig{
|
||||
PeerId: s.acc.PeerId,
|
||||
Addresses: addrs,
|
||||
Types: []nodeconf.NodeType{nodeconf.NodeTypeTree},
|
||||
|
|
|
@ -3,7 +3,7 @@ package testnodeconf
|
|||
import (
|
||||
"github.com/anytypeio/any-sync/accountservice"
|
||||
"github.com/anytypeio/any-sync/app"
|
||||
"github.com/anytypeio/any-sync/nodeconf"
|
||||
"github.com/anytypeio/any-sync/nodeconf/nodeconfstore"
|
||||
"github.com/anytypeio/any-sync/testutil/accounttest"
|
||||
)
|
||||
|
||||
|
@ -24,7 +24,7 @@ func GenNodeConfig(num int) (conf *Config) {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
nodes []nodeconf.NodeConfig
|
||||
nodes []nodeconfstore.NodeConfig
|
||||
configs []*accounttest.AccountTestService
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ func (c *Config) GetNodesConfId() string {
|
|||
return "test"
|
||||
}
|
||||
|
||||
func (c *Config) GetNodes() []nodeconf.NodeConfig {
|
||||
func (c *Config) GetNodes() []nodeconfstore.NodeConfig {
|
||||
return c.nodes
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue