Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder represents component that routes used container space values between nodes from the container.
For correct operation, Builder must be created using the constructor (New) based on the required parameters and optional components. After successful creation, the Builder is immediately ready to work through API.
func New ¶
New creates a new instance of the Builder.
Panics if at least one value of the parameters is invalid.
The created Builder does not require additional initialization and is completely ready for work.
func (*Builder) NextStage ¶
func (b *Builder) NextStage(a container.SizeEstimation, passed []loadcontroller.ServerInfo) ([]loadcontroller.ServerInfo, error)
NextStage composes container nodes for the container and epoch from a, and returns the list of nodes with maximum weight (one from each vector).
If passed route has more than one point, then endpoint of the route is reached.
The traversed route is not checked, it is assumed to be correct.
type PlacementBuilder ¶
type PlacementBuilder interface { // BuildPlacement must compose and sort (according to a specific algorithm) // storage nodes from the container by its identifier using network map // of particular epoch. BuildPlacement(epoch uint64, cnr cid.ID) ([][]netmap.NodeInfo, error) }
PlacementBuilder describes interface of FrostFS placement calculator.
type Prm ¶
type Prm struct { // Calculator of the container members. // // Must not be nil. PlacementBuilder PlacementBuilder }
Prm groups the required parameters of the Builder's constructor.
All values must comply with the requirements imposed on them. Passing incorrect parameter values will result in constructor failure (error or panic depending on the implementation).