(next redis.ProcessHook)
| 46 | func (h *cmdRecorder) DialHook(next redis.DialHook) redis.DialHook { return next } |
| 47 | |
| 48 | func (h *cmdRecorder) ProcessHook(next redis.ProcessHook) redis.ProcessHook { |
| 49 | return func(ctx context.Context, cmd redis.Cmder) error { |
| 50 | h.record(strings.ToUpper(cmd.Name())) |
| 51 | return next(ctx, cmd) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func (h *cmdRecorder) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook { |
| 56 | return func(ctx context.Context, cmds []redis.Cmder) error { |