TestHook for testing hook functionality
| 10 | |
| 11 | // TestHook for testing hook functionality |
| 12 | type 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 | |
| 23 | func (th *TestHook) OnGet(ctx context.Context, conn *Conn, isNewConn bool) (bool, error) { |
| 24 | th.OnGetCalled++ |
nothing calls this directly
no outgoing calls
no test coverage detected