Ai
1 Star 0 Fork 0

SasukeBo/go-micro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
options.go 644 Bytes
一键复制 编辑 原始数据 按行查看 历史
Asim Aslam 提交于 2021-11-08 16:59 +08:00 . add nats and redis events plugins
package stream
import "crypto/tls"
// Options which are used to configure the redis stream
type Options struct {
Address string
User string
Password string
TLSConfig *tls.Config
}
// Option is a function which configures options
type Option func(o *Options)
func Address(addr string) Option {
return func(o *Options) {
o.Address = addr
}
}
func User(user string) Option {
return func(o *Options) {
o.User = user
}
}
func Password(password string) Option {
return func(o *Options) {
o.Password = password
}
}
func TLSConfig(tlsConfig *tls.Config) Option {
return func(o *Options) {
o.TLSConfig = tlsConfig
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sasukebo/go-micro.git
git@gitee.com:sasukebo/go-micro.git
sasukebo
go-micro
go-micro
6e18eb58b836

搜索帮助