MCPcopy
hub / github.com/keploy/keploy / FilterConfigMocks

Function FilterConfigMocks

pkg/util.go:2951–2953  ·  view source on GitHub ↗

FilterConfigMocks applies the per-test time-window filter to the config mock pool. Pass strict=true for Option-1 containment (out-of-window non-config mocks are dropped); pass strict=false for legacy Option-2. See FilterTcsMocks for the env / config precedence that determines the runtime-effective v

(ctx context.Context, logger *zap.Logger, m []*models.Mock, afterTime time.Time, beforeTime time.Time, strict bool)

Source from the content-addressed store, hash-verified

2949// See FilterTcsMocks for the env / config precedence that determines
2950// the runtime-effective value.
2951func FilterConfigMocks(ctx context.Context, logger *zap.Logger, m []*models.Mock, afterTime time.Time, beforeTime time.Time, strict bool) []*models.Mock {
2952 return FilterConfigMocksTierAware(ctx, logger, m, afterTime, beforeTime, strict, time.Time{})
2953}
2954
2955// FilterConfigMocksTierAware is the tier-aware variant of
2956// FilterConfigMocks. Identical to FilterConfigMocks except it threads

Calls 1