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

Method setDefaults

redis.go:87–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (h *hooks) setDefaults() {
88 if h.dial == nil {
89 h.dial = func(ctx context.Context, network, addr string) (net.Conn, error) { return nil, nil }
90 }
91 if h.process == nil {
92 h.process = func(ctx context.Context, cmd Cmder) error { return nil }
93 }
94 if h.pipeline == nil {
95 h.pipeline = func(ctx context.Context, cmds []Cmder) error { return nil }
96 }
97 if h.txPipeline == nil {
98 h.txPipeline = func(ctx context.Context, cmds []Cmder) error { return nil }
99 }
100}
101
102// AddHook is to add a hook to the queue.
103// Hook is a function executed during network connection, command execution, and pipeline,

Callers 1

chainMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected