MCPcopy
hub / github.com/keploy/keploy / isStartupMock

Function isStartupMock

pkg/agent/proxy/syncMock/syncMock.go:880–882  ·  view source on GitHub ↗

isStartupMock reports whether a buffered mock falls in the startup window and must be preserved by every reaper instead of pruned. A mock is tagged IsStartup at ingest in AddMock when it is captured before the first inbound request (classic app-bootstrap, e.g. an AWS Secret Manager fetch) OR while f

(mk *models.Mock)

Source from the content-addressed store, hash-verified

878// merely lands before its window once we are PAST the startup window (genuine
879// stale cross-test bleed) is untagged and still reaped to bound buffer growth.
880func isStartupMock(mk *models.Mock) bool {
881 return mk != nil && mk.TestModeInfo.IsStartup
882}
883
884func (m *SyncMockManager) ResolveRange(start, end time.Time, testName string, keep bool, mapping bool) {
885 // Collect mocks and mapping data under the lock, then send to the

Callers 4

FlushOwnedWindowsMethod · 0.85
SetMemoryPressureMethod · 0.85
ResolveRangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected