The current repo belongs to Paused status, and some functions are restricted. For details, please refer to the description of repo status
2 Star 0 Fork 1

JUMEI_ARCH/go-plugins
Paused

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
options.go 376 Bytes
Copy Edit Raw Blame History
Asim Aslam authored 2018-03-03 12:28 . switch to stdlib context
package nsq
import (
"context"
"github.com/micro/go-micro/broker"
)
type contextKeyT string
var (
concurrentHandlerKey = contextKeyT("github.com/micro/go-plugins/broker/nsq/concurrentHandlers")
)
func ConcurrentHandlers(n int) broker.SubscribeOption {
return func(o *broker.SubscribeOptions) {
o.Context = context.WithValue(o.Context, concurrentHandlerKey, n)
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/JMArch/go-plugins.git
git@gitee.com:JMArch/go-plugins.git
JMArch
go-plugins
go-plugins
v0.9.3

Search

0d507c66 1850385 C8b1a773 1850385