(hook redis.DialHook)
| 13 | var _ redis.Hook = redisHook{} |
| 14 | |
| 15 | func (redisHook) DialHook(hook redis.DialHook) redis.DialHook { |
| 16 | return func(ctx context.Context, network, addr string) (net.Conn, error) { |
| 17 | fmt.Printf("dialing %s %s\n", network, addr) |
| 18 | conn, err := hook(ctx, network, addr) |
| 19 | fmt.Printf("finished dialing %s %s\n", network, addr) |
| 20 | return conn, err |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func (redisHook) ProcessHook(hook redis.ProcessHook) redis.ProcessHook { |
| 25 | return func(ctx context.Context, cmd redis.Cmder) error { |