MCPcopy Index your code
hub / github.com/keploy/keploy / SetMocks

Method SetMocks

pkg/agent/proxy/proxy.go:2720–2728  ·  view source on GitHub ↗
(_ context.Context, filtered []*models.Mock, unFiltered []*models.Mock)

Source from the content-addressed store, hash-verified

2718}
2719
2720func (p *Proxy) SetMocks(_ context.Context, filtered []*models.Mock, unFiltered []*models.Mock) error {
2721 if m := p.getMockManager(); m != nil {
2722 m.SetFilteredMocks(filtered)
2723 m.SetUnFilteredMocks(unFiltered)
2724 p.dnsCache.Purge()
2725 }
2726
2727 return nil
2728}
2729
2730// SetMocksWithWindow atomically updates mocks AND the test window in a
2731// single call so concurrent readers cannot observe a torn (newMocks,

Callers

nothing calls this directly

Implementers 1

Proxypkg/agent/proxy/proxy.go

Calls 3

getMockManagerMethod · 0.95
SetFilteredMocksMethod · 0.80
SetUnFilteredMocksMethod · 0.80

Tested by

no test coverage detected