(d time.Duration, f func())
| 193 | } |
| 194 | |
| 195 | func (g *grpcInflightLimitCheck) timeAfterFunc(d time.Duration, f func()) testableTimer { |
| 196 | if g.timeAfterFuncMock != nil { |
| 197 | return g.timeAfterFuncMock(d, f) |
| 198 | } |
| 199 | return testableTimer{timer: time.AfterFunc(d, f)} |
| 200 | } |
| 201 | |
| 202 | // This function mimics the check in grpc library, server.go, handleStream method. handleStream method can stop processing early, |
| 203 | // without calling stat handler if the method name is invalid. |