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

Method OnPut

internal/pool/hooks.go:22–22  ·  view source on GitHub ↗

OnPut is called when a connection is returned to the pool. It returns whether the connection should be pooled and whether it should be removed.

(ctx context.Context, conn *Conn)

Source from the content-addressed store, hash-verified

20 // OnPut is called when a connection is returned to the pool.
21 // It returns whether the connection should be pooled and whether it should be removed.
22 OnPut(ctx context.Context, conn *Conn) (shouldPool bool, shouldRemove bool, err error)
23
24 // OnRemove is called when a connection is removed from the pool.
25 // This happens when:

Callers 1

ProcessOnPutMethod · 0.65

Implementers 3

PoolHookmaintnotifications/pool_hook.go
ReAuthPoolHookinternal/auth/streaming/pool_hook.go
TestHookinternal/pool/hooks_test.go

Calls

no outgoing calls

Tested by

no test coverage detected