Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrRegister = errors.New("")
)
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { DSN string // contains filtered or unexported fields }
DB represents a connection to a SQL database.
func (*DB) ApplyOptions ¶
func (*DB) GetDatabase ¶
GetDatabase returns a database instance.
type DBOption ¶
type DBOption interface {
// contains filtered or unexported methods
}
A DBOption sets options.
func WithDistributedTracing ¶
func WithDistributedTracing() DBOption
WithDistributedTracing will make it so that a wrapped driver is used that supports the opentracing API.
func WithOmitArgsFromTraceSpans ¶
func WithOmitArgsFromTraceSpans() DBOption
WithOmitArgsFromTraceSpans will make it so that query arguments are omitted from tracing spans.
func WithRandomDriverName ¶
func WithRandomDriverName() DBOption
WithRandomDriverName is specifically for writing tests as you can't register a driver with the same name more than once.
func WithTraceOrphans ¶
func WithTraceOrphans() DBOption
WithTraceOrphans will make it so that root spans will be created if a trace could not be found using opentracing's SpanFromContext method.
type DBOptionFunc ¶
type DBOptionFunc func(*DB)
DBOptionFunc wraps a function that modifies DB into an implementation of the DBOption interface.
type EmptyDBOption ¶
type EmptyDBOption struct{}
EmptyDBOption does not alter the configuration. It can be embedded in another structure to build custom options.
This API is EXPERIMENTAL.