redis

package
v0.0.0-...-80e1ac6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisRecorder

func NewRedisRecorder(appName string, config Config) metrics.RedisRecorder

Types

type CollectHook

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

CollectHook is an implementation of redis.Hook interface

func (*CollectHook) AfterProcess

func (h *CollectHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error

func (*CollectHook) AfterProcessPipeline

func (h *CollectHook) AfterProcessPipeline(_ context.Context, _ []redis.Cmder) error

func (*CollectHook) BeforeProcess

func (h *CollectHook) BeforeProcess(ctx context.Context, _ redis.Cmder) (context.Context, error)

func (*CollectHook) BeforeProcessPipeline

func (h *CollectHook) BeforeProcessPipeline(ctx context.Context, _ []redis.Cmder) (context.Context, error)

func (CollectHook) Collect

func (r CollectHook) Collect(props metrics.RedisReqProperties, duration time.Duration)

Collect updates metrics using passed properties

func (CollectHook) NewCollectHook

func (r CollectHook) NewCollectHook() redis.Hook

func (CollectHook) Unregister

func (r CollectHook) Unregister()

Unregister ...

type Config

type Config struct {
	// DurationBuckets are the buckets used by Prometheus for the HTTP request duration metrics,
	// by default uses Prometheus default buckets (from 5ms to 10s).
	DurationBuckets []float64
}

Jump to

Keyboard shortcuts

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