Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultErrorInterpreter ¶
func GRPCErrorInterpreter ¶
func HTTPErrorInterpreter ¶
Types ¶
type ConfigFunc ¶
type ConfigFunc func(r *config)
func WithLogger ¶
func WithLogger(logger base.Logger) ConfigFunc
func WithPrefixConfig ¶
func WithPrefixConfig(prefix string, prefixConfig *PrefixConfig) ConfigFunc
func WithPrefixConfigs ¶
func WithPrefixConfigs(prefixConfigs map[string]*PrefixConfig) ConfigFunc
type ErrorInterpreter ¶
func NewMultiErrorInterpreter ¶
func NewMultiErrorInterpreter(interpreters ...ErrorInterpreter) ErrorInterpreter
type HTTPStatusError ¶
type HTTPStatusError struct {
// contains filtered or unexported fields
}
func NewHTTPStatusError ¶
func NewHTTPStatusError(code int, message string, args ...interface{}) *HTTPStatusError
func (*HTTPStatusError) Code ¶
func (e *HTTPStatusError) Code() int
func (*HTTPStatusError) Error ¶
func (e *HTTPStatusError) Error() string
type PrefixConfig ¶
type PrefixConfig struct {
// contains filtered or unexported fields
}
func NewPrefixConfig ¶
func NewPrefixConfig(configs ...PrefixConfigFunc) *PrefixConfig
type PrefixConfigFunc ¶
type PrefixConfigFunc func(r *PrefixConfig)
func WithPrefixBuckets ¶
func WithPrefixBuckets(buckets []float64) PrefixConfigFunc
func WithPrefixErrorInterpreter ¶
func WithPrefixErrorInterpreter(errorInterpreter ErrorInterpreter) PrefixConfigFunc
func WithPrefixReportConfigs ¶
func WithPrefixReportConfigs(configs ...base.ConfigFunc) PrefixConfigFunc
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
func NewReporter ¶
func NewReporter(reporter base.Reporter, configs ...ConfigFunc) *Reporter
func (*Reporter) ReportDuration ¶
func (r *Reporter) ReportDuration(prefix string, duration float64, configs ...base.ConfigFunc)
func (*Reporter) ReportError ¶
func (r *Reporter) ReportError(prefix string, err error, configs ...base.ConfigFunc)
func (*Reporter) ReportRequest ¶
func (r *Reporter) ReportRequest(prefix string, configs ...base.ConfigFunc)
Click to show internal directories.
Click to hide internal directories.