ipld-eth-server/vendor/gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis/option.go

18 lines
499 B
Go
Raw Normal View History

2018-09-04 16:35:38 +00:00
package redis // import "gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis"
type clientConfig struct{ serviceName string }
// ClientOption represents an option that can be used to create or wrap a client.
type ClientOption func(*clientConfig)
func defaults(cfg *clientConfig) {
cfg.serviceName = "redis.client"
}
// WithServiceName sets the given service name for the client.
func WithServiceName(name string) ClientOption {
return func(cfg *clientConfig) {
cfg.serviceName = name
}
}