Skip to content

包装了sarama包的生产消费者#5

Merged
sunjunnan79 merged 20 commits intomuxi-Infra:mainfrom
luohuixi:main
Sep 22, 2025
Merged

包装了sarama包的生产消费者#5
sunjunnan79 merged 20 commits intomuxi-Infra:mainfrom
luohuixi:main

Conversation

@luohuixi
Copy link
Copy Markdown
Contributor

kafka部分

Copy link
Copy Markdown
Contributor

@sunjunnan79 sunjunnan79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

总体问题不大,可以添加下说明文档,说明一下支持的范围啥的

Comment thread pkg/kafka/producer.go Outdated
p.producer.Input() <- msg

//异步不能在这里查错
return -1, -1, nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么空值不用0而是用-1

Copy link
Copy Markdown
Contributor

@sunjunnan79 sunjunnan79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写的还可以

Comment thread pkg/sql/cache.go Outdated
SetTTl time.Duration //写入缓存的允许最大时长
}

func ConnectCache(addr, password string, number int, TTL, TTL2 time.Duration) *CacheExecute {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

两个ttl区分下命名

@Serendipity565
Copy link
Copy Markdown

new/template/cmd/main.go.tpl
测试文件的起始目录不对,和main函数不一样,这个需要调整一下,不然测试不会通过

@Serendipity565
Copy link
Copy Markdown

要不用绝对目录拼接一下吧,os.Getwd()

Copy link
Copy Markdown
Contributor

@sunjunnan79 sunjunnan79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码太多,先合并进去吧,晚上我拉下来慢慢看

@sunjunnan79 sunjunnan79 merged commit fb25fb2 into muxi-Infra:main Sep 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants