selector

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeWR   = "wr"
	TypeWrr  = "wrr"
	TypeDwrr = "dwrr"
	TypeP2C  = "p2c"
	TypeICMP = "icmp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleInfo

type HandleInfo struct {
	Node servicer.Node
	Err  error
}

type Selector

type Selector interface {
	ServiceName() string
	AddNode(node servicer.Node) (err error)
	DeleteNode(node servicer.Node) (err error)
	GetNodes() (nodes []servicer.Node, err error)
	Select() (node servicer.Node, err error)
	AfterHandle(info HandleInfo)
}

Directories

Path Synopsis
dwrr is Dynamic Weighted Round Robin
dwrr is Dynamic Weighted Round Robin
icmp is load balance by ping rtt
icmp is load balance by ping rtt
p2c is reference https://exceting.github.io/2020/08/13/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-P2C%E7%AE%97%E6%B3%95/
p2c is reference https://exceting.github.io/2020/08/13/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-P2C%E7%AE%97%E6%B3%95/
wr is Weighted random
wr is Weighted random
wrr is Weighted Round Robin reference Nginx https://blog.csdn.net/zhangskd/article/details/50194069
wrr is Weighted Round Robin reference Nginx https://blog.csdn.net/zhangskd/article/details/50194069

Jump to

Keyboard shortcuts

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