[#1333] services/control: Allow to synchronize local trees
Do not check that a node indeed belongs to the container, because the synchronization will fail in this case anyway. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0dc1a4e336
commit
bfdd68dcb3
13 changed files with 836 additions and 180 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
func initTreeService(c *cfg) {
|
||||
treeSvc := tree.New(
|
||||
c.treeService = tree.New(
|
||||
tree.WithContainerSource(c.cfgObject.cnrSource),
|
||||
tree.WithNetmapSource(c.netMapSource),
|
||||
tree.WithPrivateKey(&c.key.PrivateKey),
|
||||
|
@ -15,12 +15,12 @@ func initTreeService(c *cfg) {
|
|||
tree.WithStorage(c.cfgObject.cfgLocalStorage.localStorage))
|
||||
|
||||
for _, srv := range c.cfgGRPC.servers {
|
||||
tree.RegisterTreeServiceServer(srv, treeSvc)
|
||||
tree.RegisterTreeServiceServer(srv, c.treeService)
|
||||
}
|
||||
|
||||
c.workers = append(c.workers, newWorkerFromFunc(func(ctx context.Context) {
|
||||
treeSvc.Start(ctx)
|
||||
c.treeService.Start(ctx)
|
||||
}))
|
||||
|
||||
c.onShutdown(treeSvc.Shutdown)
|
||||
c.onShutdown(c.treeService.Shutdown)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue