MCPcopy
hub / github.com/redis/go-redis / ProcessHook

Method ProcessHook

example_instrumentation_test.go:24–31  ·  example_instrumentation_test.go::redisHook.ProcessHook
(hook redis.ProcessHook)

Source from the content-addressed store, hash-verified

22}
23
24func (redisHook) ProcessHook(hook redis.ProcessHook) redis.ProcessHook {
25 return func(ctx context.Context, cmd redis.Cmder) error {
26 fmt.Printf("starting processing: <%v>\n", cmd.Args())
27 err := hook(ctx, cmd)
28 fmt.Printf("finished processing: <%v>\n", cmd.Args())
29 return err
30 }
31}
32
33func (redisHook) ProcessPipelineHook(hook redis.ProcessPipelineHook) redis.ProcessPipelineHook {
34 return func(ctx context.Context, cmds []redis.Cmder) error {

Callers

nothing calls this directly

Calls 3

hookStruct · 0.85
PrintfMethod · 0.65
ArgsMethod · 0.65

Tested by

no test coverage detected