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

18 lines
388 B
Go
Raw Normal View History

2018-09-04 16:35:38 +00:00
package graphql
type config struct{ serviceName string }
// Option represents an option that can be used customize the Tracer.
type Option func(*config)
func defaults(cfg *config) {
cfg.serviceName = "graphql.server"
}
// WithServiceName sets the given service name for the client.
func WithServiceName(name string) Option {
return func(cfg *config) {
cfg.serviceName = name
}
}