frostfs-node/modules/node/placement.go
alexvanin dadfd90dcd Initial commit
Initial public review release v0.10.0
2020-07-10 17:45:00 +03:00

33 lines
575 B
Go

package node
import (
"github.com/nspcc-dev/neofs-node/lib/implementations"
"github.com/nspcc-dev/neofs-node/lib/placement"
"go.uber.org/dig"
)
type (
placementToolParams struct {
dig.In
Placement placement.Component
}
placementToolResult struct {
dig.Out
Placer implementations.ObjectPlacer
Receiver implementations.EpochReceiver
}
)
func newPlacementTool(p placementToolParams) (res placementToolResult, err error) {
if res.Placer, err = implementations.NewObjectPlacer(p.Placement); err != nil {
return
}
res.Receiver = res.Placer
return
}