MCPcopy
hub / github.com/grafana/dskit / timeAfterFunc

Method timeAfterFunc

server/limits.go:195–200  ·  view source on GitHub ↗
(d time.Duration, f func())

Source from the content-addressed store, hash-verified

193}
194
195func (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.

Callers 1

TapHandleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected