增加随机选取节点的方法

This commit is contained in:
2021-04-01 18:57:14 +08:00
parent d962588d2f
commit e3f273d757
6 changed files with 201 additions and 26 deletions

20
dispatch/abstract.go Normal file
View File

@ -0,0 +1,20 @@
// Package dispatch...
//
// Description : dispatch...
//
// Author : go_developer@163.com<张德满>
//
// Date : 2021-04-01 5:53 下午
package dispatch
import "github.com/go-developer/balance/define"
// IDispatch 负载均衡的接口定义
//
// Author : go_developer@163.com<张德满>
//
// Date : 2:44 下午 2021/4/1
type IDispatch interface {
// Get 获取一个节点
Get(nodeList []*define.SeverNode) (string, *define.Error)
}