MCPcopy Create free account
hub / github.com/catwithtudou/load-balancer-algorithm / Server

Struct Server

loadbalancer/load_balancer.go:8–17  ·  view source on GitHub ↗

Server 表示一个后端服务器

Source from the content-addressed store, hash-verified

6
7// Server 表示一个后端服务器
8type Server struct {
9 Address string
10 Weight int
11 // 用于最小连接算法的当前连接数
12 CurrentConnections int32
13 // 用于轮询算法的当前权重
14 CurrentWeight int
15 // 用于轮询算法的有效权重
16 EffectiveWeight int
17}
18
19// LoadBalancer 定义负载均衡器接口
20type LoadBalancer interface {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected