升级接口Server接口约束,支持修改服务器节点配置
This commit is contained in:
22
abstract/IServer.go
Normal file
22
abstract/IServer.go
Normal file
@ -0,0 +1,22 @@
|
||||
// Package abstract ...
|
||||
//
|
||||
// Description : abstract ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-05-23 22:30
|
||||
package abstract
|
||||
|
||||
import (
|
||||
"git.zhangdeman.cn/gateway/balance/define"
|
||||
"git.zhangdeman.cn/zhangdeman/exception"
|
||||
)
|
||||
|
||||
// IServer 服务节点集合的接口约束
|
||||
type IServer interface {
|
||||
Add(node *define.SeverNode) // 在集群中添加一个节点
|
||||
Modify(node *define.SeverNode) // 修改集群中一个节点的信息
|
||||
Remove(nodeID string) // 在集群中移除一个节点
|
||||
Get() (string, exception.IException) // 获取一个访问节点
|
||||
ChangeBalance(d IBalance) // 修改负载均衡策略
|
||||
}
|
Reference in New Issue
Block a user