loadbalance

package
v1.4.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConsistentHash ...
	ConsistentHash = "consistenthash"
	// HashNodes ...
	HashNodes = "hash.nodes"
	// HashArguments ...
	HashArguments = "hash.arguments"
)
View Source
const (
	// RoundRobin ...
	RoundRobin = "roundrobin"

	// COMPLETE ...
	COMPLETE = 0
	// UPDATING ...
	UPDATING = 1
)
View Source
const (
	// LeastActive ...
	LeastActive = "leastactive"
)

Variables

This section is empty.

Functions

func GetWeight

func GetWeight(invoker protocol.Invoker, invocation protocol.Invocation) int64

GetWeight ...

func NewConsistentHashLoadBalance

func NewConsistentHashLoadBalance() cluster.LoadBalance

NewConsistentHashLoadBalance ...

func NewLeastActiveLoadBalance

func NewLeastActiveLoadBalance() cluster.LoadBalance

NewLeastActiveLoadBalance ...

func NewRandomLoadBalance

func NewRandomLoadBalance() cluster.LoadBalance

NewRandomLoadBalance ...

func NewRoundRobinLoadBalance

func NewRoundRobinLoadBalance() cluster.LoadBalance

NewRoundRobinLoadBalance ...

Types

type ConsistentHashLoadBalance

type ConsistentHashLoadBalance struct {
}

ConsistentHashLoadBalance ...

func (*ConsistentHashLoadBalance) Select

func (lb *ConsistentHashLoadBalance) Select(invokers []protocol.Invoker, invocation protocol.Invocation) protocol.Invoker

Select ...

type ConsistentHashSelector

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

ConsistentHashSelector ...

func (*ConsistentHashSelector) Select

Select ...

type Uint32Slice

type Uint32Slice []uint32

Uint32Slice ...

func (Uint32Slice) Len

func (s Uint32Slice) Len() int

func (Uint32Slice) Less

func (s Uint32Slice) Less(i, j int) bool

func (Uint32Slice) Swap

func (s Uint32Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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