1 Star 3 Fork 3

tym_hmm/kafka-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
Stragey
StrategyAbstract.go
StrategyFactory.go
StrategyRoundRobin.go
demo
.gitignore
ApiInterface.go
ConsumerBuild.go
ConsumerFactory.go
Container.go
Context.go
Error.go
LICENSE
Listener.go
Log.go
Pool.go
ProductBuild.go
ProductFactory.go
Utils.go
go.mod
readme.md
克隆/下载
StrategyAbstract.go 518 Bytes
一键复制 编辑 原始数据 按行查看 历史
天蝎儿 提交于 2年前 . 完成生产者处理
package Stragey
type StrategyBase struct {
index int32
max int32
}
func (this *StrategyBase) SetIndex(index int32) {
this.index = index
}
func (this *StrategyBase) GetIndex() int32 {
return this.index
}
func (this *StrategyBase) SetMax(max int32) {
this.max = max
}
func (this *StrategyBase) GetMax() int32 {
return this.max
}
/**
抽象处理
*/
type StrategyApi interface {
GetIndex() int32
GetMax() int32
/**
策略执行
@param index
@param max
@return int32
*/
Exec(index, max int32) int32
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tym_hmm/kafka-go.git
git@gitee.com:tym_hmm/kafka-go.git
tym_hmm
kafka-go
kafka-go
master

搜索帮助