Documentation ¶
Index ¶
- type Hook
- func (hook *Hook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (hook *Hook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error
- func (hook *Hook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)
- func (hook *Hook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)
- type Option
- type Options
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook represents a go-redis hook that exports metrics of commands and pipelines.
The following metrics are exported:
- Single commands (not-pipelined)
- Histogram of duration
- Counter of errors
- Pipelined commands
- Counter of commands
- Counter of errors
The duration of individual pipelined commands won't be collected, but the overall duration of the pipeline will, with a pseudo-command called "pipeline".
func (*Hook) AfterProcess ¶
func (*Hook) AfterProcessPipeline ¶
func (*Hook) BeforeProcess ¶
type Option ¶
type Option func(*Options)
func WithDurationBuckets ¶
WithDurationBuckets sets the duration buckets of single commands metrics.
func WithNamespace ¶
WithNamespace sets the namespace of all metrics.
func WithStatInterval ¶
WithStatInterval sets the duration buckets of single commands metrics.
func WithSubsystem ¶
WithSubsystem sets the namespace of all metrics.
Click to show internal directories.
Click to hide internal directories.