[#33] placement: Add public constructor for netmap placement builder

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
support/v0.27
Leonard Lyubich 2020-09-21 17:27:02 +03:00 committed by Alex Vanin
parent 900949c648
commit 12e5e4e2d8
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,12 @@ type netMapBuilder struct {
nm *netmap.Netmap
}
func NewNetworkMapBuilder(nm *netmap.Netmap) Builder {
return &netMapBuilder{
nm: nm,
}
}
func (b *netMapBuilder) BuildPlacement(a *object.Address, p *netmap.PlacementPolicy) ([]netmap.Nodes, error) {
aV2 := a.ToV2()