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

Method withProcessPipelineHook

redis.go:190–199  ·  view source on GitHub ↗
(
	ctx context.Context, cmds []Cmder, hook ProcessPipelineHook,
)

Source from the content-addressed store, hash-verified

188}
189
190func (hs *hooksMixin) withProcessPipelineHook(
191 ctx context.Context, cmds []Cmder, hook ProcessPipelineHook,
192) error {
193 for i := len(hs.slice) - 1; i >= 0; i-- {
194 if wrapped := hs.slice[i].ProcessPipelineHook(hook); wrapped != nil {
195 hook = wrapped
196 }
197 }
198 return hook(ctx, cmds)
199}
200
201func (hs *hooksMixin) dialHook(ctx context.Context, network, addr string) (net.Conn, error) {
202 // Access to hs.current is guarded by a read-only lock since it may be mutated by AddHook(...)

Callers 2

processPipelineNodeMethod · 0.80
processTxPipelineNodeMethod · 0.80

Calls 2

hookStruct · 0.85
ProcessPipelineHookMethod · 0.65

Tested by

no test coverage detected