Documentation ¶
Index ¶
- func LocalityPrioritySelector(src *mesh2.Client, dest *mesh2.Node) uint32
- func NewLeastRequest(s LeastRequestSettings) network.Connection
- func NewRoundRobin(conns []*WeightedConnection) network.Connection
- type EDF
- type Entry
- type LeastRequestSettings
- type PrioritySelector
- type WeightedConnection
- type WeightedConnectionFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLeastRequest ¶
func NewLeastRequest(s LeastRequestSettings) network.Connection
func NewRoundRobin ¶
func NewRoundRobin(conns []*WeightedConnection) network.Connection
Types ¶
type EDF ¶
type EDF struct {
// contains filtered or unexported fields
}
EDF implements the Earliest Deadline First scheduling algorithm
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry is an item for load balance
type LeastRequestSettings ¶
type LeastRequestSettings struct { Connections []*WeightedConnection ActiveRequestBias float64 }
type WeightedConnection ¶
type WeightedConnection struct { network2.Connection Weight uint32 }
type WeightedConnectionFactory ¶
type WeightedConnectionFactory func(src *mesh2.Client, n *mesh2.Node) *WeightedConnection
func EquallyWeightedConnectionFactory ¶
func EquallyWeightedConnectionFactory() WeightedConnectionFactory
func PriorityWeightedConnectionFactory ¶
func PriorityWeightedConnectionFactory(selectPriority PrioritySelector, priorityWeightMap map[uint32]uint32) WeightedConnectionFactory
Click to show internal directories.
Click to hide internal directories.