Documentation
¶
Index ¶
- Constants
- func NewEnginesNodeRanker() *featureNodeRanker[model.Engine]
- func NewPublishersNodeRanker() *featureNodeRanker[model.Publisher]
- func NewStoragesNodeRanker() *featureNodeRanker[model.StorageSourceType]
- func NewVerifiersNodeRanker() *featureNodeRanker[model.Verifier]
- type Chain
- type LabelsNodeRanker
- type MaxUsageNodeRanker
- type MinVersionNodeRanker
- type MinVersionNodeRankerParams
- type PreviousExecutionsNodeRanker
- type PreviousExecutionsNodeRankerParams
- type RandomNodeRanker
- type RandomNodeRankerParams
Constants ¶
const FavourNodeSelectorPrefix = "favour_"
FavourNodeSelectorPrefix labels prefixed with this string will be considered as a "favour" selector that prioritizes those nodes, instead of a "must" selector that filters out nodes that don't match.
Variables ¶
This section is empty.
Functions ¶
func NewEnginesNodeRanker ¶
func NewPublishersNodeRanker ¶ added in v0.3.29
func NewStoragesNodeRanker ¶ added in v0.3.29
func NewStoragesNodeRanker() *featureNodeRanker[model.StorageSourceType]
func NewVerifiersNodeRanker ¶ added in v0.3.29
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain assigns a random rank to each node to allow the requester to select random top nodes for job execution.
type LabelsNodeRanker ¶
type LabelsNodeRanker struct { }
func NewLabelsNodeRanker ¶
func NewLabelsNodeRanker() *LabelsNodeRanker
func (*LabelsNodeRanker) RankNodes ¶
func (s *LabelsNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)
RankNodes ranks nodes based on the node labels and job selectors: - Rank 20: Selectors with `favour_` prefix and matching node labels - Rank 10: Selectors match node labels. - Rank -1: Selectors don't match node labels. - Rank 0: Job selectors are not set.
type MaxUsageNodeRanker ¶
type MaxUsageNodeRanker struct { }
func NewMaxUsageNodeRanker ¶
func NewMaxUsageNodeRanker() *MaxUsageNodeRanker
func (*MaxUsageNodeRanker) RankNodes ¶
func (s *MaxUsageNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)
RankNodes ranks nodes based on the MaxJobRequirements the compute nodes are accepting: - Rank 10: Node is accepting MaxJobRequirements that are equal or higher than the job requirements. - Rank -1: Node is accepting MaxJobRequirements that are lower than the job requirements. - Rank 0: Node MaxJobRequirements are not set, or the node was discovered not through nodeInfoPublisher (e.g. identity protocol)
type MinVersionNodeRanker ¶
type MinVersionNodeRanker struct {
// contains filtered or unexported fields
}
func NewMinVersionNodeRanker ¶
func NewMinVersionNodeRanker(params MinVersionNodeRankerParams) *MinVersionNodeRanker
type MinVersionNodeRankerParams ¶
type MinVersionNodeRankerParams struct {
MinVersion model.BuildVersionInfo
}
type PreviousExecutionsNodeRanker ¶ added in v0.3.25
type PreviousExecutionsNodeRanker struct {
// contains filtered or unexported fields
}
func NewPreviousExecutionsNodeRanker ¶ added in v0.3.25
func NewPreviousExecutionsNodeRanker(params PreviousExecutionsNodeRankerParams) *PreviousExecutionsNodeRanker
func (*PreviousExecutionsNodeRanker) RankNodes ¶ added in v0.3.25
func (s *PreviousExecutionsNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)
RankNodes ranks nodes based on whether the node has already executed the job, which is useful when ranking nodes when handling retries: - Rank 30: Node has never executed the job. - Rank 0: Node has already executed the job. - Rank -1: Node has executed the job more than once, has rejected a bid, or produced a invalid result
type PreviousExecutionsNodeRankerParams ¶ added in v0.3.25
type RandomNodeRanker ¶
type RandomNodeRanker struct {
// contains filtered or unexported fields
}
RandomNodeRanker assigns a random rank to each node to allow the requester to select random top nodes for job execution.
func NewRandomNodeRanker ¶
func NewRandomNodeRanker(params RandomNodeRankerParams) *RandomNodeRanker
type RandomNodeRankerParams ¶
type RandomNodeRankerParams struct {
RandomnessRange int
}