增加平滑给予权重负载的调度策略实现
This commit is contained in:
@ -13,12 +13,14 @@ package define
|
||||
//
|
||||
// Date : 2:46 下午 2021/4/1
|
||||
type SeverNode struct {
|
||||
ID string `json:"id"` // 机器编号
|
||||
Host string `json:"host"` // ip
|
||||
Port int `json:"port"` // 端口
|
||||
Weight float64 `json:"weight"` // 权重
|
||||
Status int `json:"status"` // 状态
|
||||
Count uint64 `json:"count"` // 节点访问次数, 用于实现最小访问次数的策略
|
||||
CostTime uint64 `json:"cost_time"` // 节点访问耗时, 用于实现最小访问耗时的策略
|
||||
FailureCount uint64 `json:"failure_count"` // 节点访问失败次数, 用于实现最小访问失败次数的策略
|
||||
ID string `json:"id"` // 机器编号
|
||||
Host string `json:"host"` // ip
|
||||
Port int `json:"port"` // 端口
|
||||
Weight int64 `json:"weight"` // 权重
|
||||
CurrentWeight int64 `json:"current_weight"` // 当前权重
|
||||
EffectiveWeight int64 `json:"effective_weight"` // 有效权重
|
||||
Status int `json:"status"` // 状态
|
||||
Count uint64 `json:"count"` // 节点访问次数, 用于实现最小访问次数的策略
|
||||
CostTime uint64 `json:"cost_time"` // 节点访问耗时, 用于实现最小访问耗时的策略
|
||||
FailureCount uint64 `json:"failure_count"` // 节点访问失败次数, 用于实现最小访问失败次数的策略
|
||||
}
|
||||
|
Reference in New Issue
Block a user