.github all: add simplified chinese edition (#27) Dec 7, 2021 .vscode doc: add mindmap for top level heading (#1) Sep 18, 2020 assets public: support toc navigator Dec 15, 2020 public all: add simplified chinese edition (#27) Dec 7, 2021 ...
代码语言:javascript 复制 func(s*ServerSession)doMsg(stream*Stream)error{iferr:=s.writeAcknowledgementIfNeeded(stream);err!=nil{returnerr}//log.Debugf("%d %d %v", stream.header.msgTypeId, stream.msgLen, stream.header)switchstream.header.MsgTypeId{casebase.RtmpTypeIdWinAckSize:returns.doWinAck...
go run -mod=mod github.com/google/wire/cmd/wire ./cmd/server 在Server层引用Pulsar的Server 首先要创建Server: packageserverimport( ..."github.com/tx7do/kratos-transport/transport/pulsar")// NewPulsarServer create a pulsar server.funcNewPulsarServer(cfg *conf.Bootstrap, _ log.Logger, svc *se...
-d '{"programArgs": "--bootstrap.servers kafka:9092 --checkpointing --event-time", "savepointPath": "<savepoint-path>"}' 1. 2. 3. Expected Response (pretty-printed) { "jobid": "<job-id>" } 1. 2. 3. 当Job再次运行时,您将在输出Topic中看到,当Job处理停机期间积累的backlog时,记...
.github Upgrade to Go 1.22 Feb 8, 2024 bufferpool all: gofmt -w -r 'interface{} -> any' . Mar 18, 2022 cache Handle resource changes when the resources is already evicted from cache Feb 4, 2024 codegen all: Run gofumpt -l -w . ...
success := manager.rsList.flushList(func(rsToDelete *item) (bool, error) { return true, nil }) assert.True(t, success) } 通过https://github.com/agiledragon/gomonkey给程序进行mock,可以屏蔽掉外部调用对所要测试的方法的影响 如果需要 给私有方法打桩,则可以使用高版本的gomonkey,这样可以让我们更...
packagerepositoryimport("github.com/8treenet/freedom/example/fshop/domain/entity""github.com/8treenet/freedom/example/fshop/infra/domainevent""github.com/8treenet/freedom")typeUserRepositorystruct{freedom.RepositoryEventRepository*domainevent.EventManager//领域事件组件}// Save .func(repo*UserRepository...
2,consumer.ConsumePartition 从指定topic,指定分区消费消息 3, msg := range pc.Messages() 获取消息 如果不需要拿到所有的分区,也可以只指定comsumer group 代码语言:javascript 复制 packagemainimport("context""fmt""os""os/signal""sync""github.com/Shopify/sarama")type consumerGroupHandler struct{name stri...
//领域事件基础设施包packagedomainevent// EventManager 实现了通用的Pub/Sub处理,资源库引入后直接使用Save方法.typeEventManagerstruct{}//EventTransaction 配合EventManager的事务组件.typeEventTransactionstruct{} 更多细节,请参考代码。 https://github.com/8treenet/freedom/blob/master/example/fshop ...
err := c.behavior.ProcessEvent(event)iferr !=nil{ c.loop.Kill(err)continue} measuring.EndMeasuring() } } } 开发者ID:jmptrader,项目名称:golib,代码行数:25,代码来源:cell.go 注:本文中的github.com/tideland/golib/loop.Loop类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片...