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 728 Bytes
Copy Edit Raw Blame History
Asim Aslam authored 2016-12-06 16:07 . 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
}
}
马建仓 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