nodepicker

package
v1.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAliveNodes = coderr.NewCodeError(coderr.InvalidParams, "no alive nodes is found")

Functions

This section is empty.

Types

type Config

type Config struct {
	NumTotalShards    uint32
	ShardAffinityRule map[storage.ShardID]scheduler.ShardAffinity
}

type ConsistentUniformHashNodePicker

type ConsistentUniformHashNodePicker struct {
	// contains filtered or unexported fields
}

func (*ConsistentUniformHashNodePicker) PickNode

type NodePicker

type NodePicker interface {
	PickNode(ctx context.Context, config Config, shardIDs []storage.ShardID, registerNodes []metadata.RegisteredNode) (map[storage.ShardID]metadata.RegisteredNode, error)
}

func NewConsistentUniformHashNodePicker

func NewConsistentUniformHashNodePicker(logger *zap.Logger) NodePicker

Directories

Path Synopsis
Package hash provides a consistent hashing function with bounded loads.
Package hash provides a consistent hashing function with bounded loads.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL