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

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-21 17:27:02 +03:00 committed by Alex Vanin
parent 900949c648
commit 12e5e4e2d8

View file

@ -10,6 +10,12 @@ type netMapBuilder struct {
nm *netmap.Netmap 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) { func (b *netMapBuilder) BuildPlacement(a *object.Address, p *netmap.PlacementPolicy) ([]netmap.Nodes, error) {
aV2 := a.ToV2() aV2 := a.ToV2()