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

Struct TestHook

internal/pool/hooks_test.go:12–21  ·  view source on GitHub ↗

TestHook for testing hook functionality

Source from the content-addressed store, hash-verified

10
11// TestHook for testing hook functionality
12type TestHook struct {
13 OnGetCalled int
14 OnPutCalled int
15 OnRemoveCalled int
16 GetError error
17 PutError error
18 ShouldPool bool
19 ShouldRemove bool
20 ShouldAccept bool
21}
22
23func (th *TestHook) OnGet(ctx context.Context, conn *Conn, isNewConn bool) (bool, error) {
24 th.OnGetCalled++

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected