增加第一个简版的轮询负载均衡

This commit is contained in:
2021-10-19 14:48:46 +08:00
parent 3aaffbeab2
commit 75b557b07f
6 changed files with 178 additions and 2 deletions

19
balance/define/base.go Normal file
View File

@ -0,0 +1,19 @@
// Package define...
//
// Description : define...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2021-10-19 12:43 下午
package define
const (
// ServerNodeStatusNormal 服务节点状态正常
ServerNodeStatusNormal = 0
// ServerNodeStatusLoss 探活逻辑无法和服务建立连接
ServerNodeStatusLoss = 1
// ServerNodeStatusException 指定时间区间内出现过多 5xx
ServerNodeStatusException = 2
// ServerNodeStatusRemove 通过调用函数的方法,将节点移除
ServerNodeStatusRemove = 3
)