balance/define/define.go

27 lines
1.1 KiB
Go

// Package define ...
//
// Description : define ...
//
// Author : go_developer@163.com<张德满>
//
// Date : 2021-04-01 5:58 下午
package define
// SeverNode 服务器节点的数据结构
//
// Author : go_developer@163.com<张德满>
//
// Date : 2:46 下午 2021/4/1
type SeverNode struct {
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"` // 节点访问失败次数, 用于实现最小访问失败次数的策略
}