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 ¶
func (p *ConsistentUniformHashNodePicker) PickNode(_ context.Context, config Config, shardIDs []storage.ShardID, registerNodes []metadata.RegisteredNode) (map[storage.ShardID]metadata.RegisteredNode, error)
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
Click to show internal directories.
Click to hide internal directories.