2 Star 0 Fork 1

JUMEI_ARCH/go-plugins
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
options.go 728 Bytes
一键复制 编辑 原始数据 按行查看 历史
Asim Aslam 提交于 2016-12-07 00:07 +08:00 . add x-ray plugin for micro toolkit
package awsxray
import (
"github.com/aws/aws-sdk-go/service/xray"
)
type Options struct {
// XRay Client when using API
Client *xray.XRay
// Daemon address when using UDP
Daemon string
// Name of segments e.g the service
Name string
}
type Option func(o *Options)
// WithName sets the name used for each segment. Use Service Name
func WithName(name string) Option {
return func(o *Options) {
o.Name = name
}
}
// WithClient sets the XRay Client to use to send segments
func WithClient(x *xray.XRay) Option {
return func(o *Options) {
o.Client = x
}
}
// WithDaemon sets the address of the XRay Daemon to send segements
func WithDaemon(addr string) Option {
return func(o *Options) {
o.Daemon = addr
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/JMArch/go-plugins.git
git@gitee.com:JMArch/go-plugins.git
JMArch
go-plugins
go-plugins
v0.14.1

搜索帮助