unary

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(logger Logger, metrics prometheus.Registerer) *Builder

func (*Builder) Build

func (builder *Builder) Build() ClientTrace

func (*Builder) HistogramVec

func (builder *Builder) HistogramVec(histogram *prometheus.HistogramVec) *Builder

func (*Builder) LogDebugf

func (builder *Builder) LogDebugf(format string, args ...interface{}) *Builder

func (*Builder) LogInfof

func (builder *Builder) LogInfof(format string, args ...interface{}) *Builder

func (*Builder) MetricCounterVec

func (builder *Builder) MetricCounterVec(counter *prometheus.CounterVec) *Builder

type ClientTrace

type ClientTrace interface {
	Observe(ctx context.Context, a string) func()
}

func Combine

func Combine(traces ...ClientTrace) ClientTrace

func LogDebugf

func LogDebugf(logger Logger, format string, args ...interface{}) ClientTrace

func LogInfof

func LogInfof(logger Logger, format string, args ...interface{}) ClientTrace

func Noop

func Noop() ClientTrace

type ClientTraceFunc

type ClientTraceFunc func(ctx context.Context, a string) func()

func (ClientTraceFunc) Observe

func (fn ClientTraceFunc) Observe(ctx context.Context, a string) func()

type Logger

type Logger interface {
	Debugf(template string, args ...interface{})
	Errorf(template string, args ...interface{})
	Infof(template string, args ...interface{})
	Errf(err error, template string, args ...interface{})
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL