const ( // BCryptHashOpName is the operation name for bcrypt hashing operations. BCryptHashOpName = "bcrypt.hash" // BCryptCompareOpName is the operation name for bcrypt comparation operations. BCryptCompareOpName = "bcrypt.compare" // BCryptWorkFactorTagName is the operation name for bcrypt workfactor settings. BCryptWorkFactorTagName = "bcrypt.workfactor" )
type Config struct { ServiceName string Provider string Jaeger *JaegerConfig Zipkin *ZipkinConfig }
JaegerConfig encapsulates jaeger's configuration.
type JaegerConfig struct { LocalAgentHostPort string SamplerType string SamplerValue float64 SamplerServerURL string Propagation string }
TracedBCrypt implements the Hasher interface.
type TracedBCrypt struct { WorkFactor int }
func (b *TracedBCrypt) Compare(ctx context.Context, hash, data []byte) error
Compare returns nil if hash and data match.
func (b *TracedBCrypt) Hash(ctx context.Context, data []byte) ([]byte, error)
Hash returns the hashed string or an error.
Tracer encapsulates tracing abilities.
type Tracer struct { Config *Config // contains filtered or unexported fields }
func New(l *logrusx.Logger, c *Config) (*Tracer, error)
func (t *Tracer) Close()
Close closes the tracer.
func (t *Tracer) IsLoaded() bool
IsLoaded returns true if the tracer has been loaded.
func (t *Tracer) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (t *Tracer) Tracer() opentracing.Tracer
Tracer returns the wrapped tracer
ZipkinConfig encapsulates zipkin's configuration.
type ZipkinConfig struct { ServerURL string }