增加加权负载轮询的实现

This commit is contained in:
2021-11-22 19:12:49 +08:00
parent 39e3cdef91
commit fa426ae90c
4 changed files with 124 additions and 13 deletions

View File

@ -13,8 +13,9 @@ package define
//
// Date : 12:36 下午 2021/10/19
type ServerNode struct {
HostIP string `json:"host_ip"` // 机器IP
Port int `json:"port"` // 机器端口
Status int `json:"status"` // 机器状态
Weight int `json:"weight"` // 机器权重
HostIP string `json:"host_ip"` // 机器IP
Port int `json:"port"` // 机器端口
Status int `json:"status"` // 机器状态
Weight float64 `json:"weight"` // 机器权重
CurrentWeight float64 `json:"current_weight"` // 当前权重
}