MCPcopy
hub / github.com/keploy/keploy / New

Function New

pkg/agent/proxy/fakeconn/fakeconn.go:91–93  ·  view source on GitHub ↗

New constructs a FakeConn. ch is the relay-owned Chunk channel; localAddr and remoteAddr are returned from LocalAddr/RemoteAddr (nil values are replaced with a "fakeconn" placeholder).

(ch <-chan Chunk, localAddr, remoteAddr net.Addr)

Source from the content-addressed store, hash-verified

89// localAddr and remoteAddr are returned from LocalAddr/RemoteAddr
90// (nil values are replaced with a "fakeconn" placeholder).
91func New(ch <-chan Chunk, localAddr, remoteAddr net.Addr) *FakeConn {
92 return newWithLogger(ch, localAddr, remoteAddr, nopLogger{})
93}
94
95// NewWithLogger is New with a caller-supplied logger for diagnostic
96// messages (e.g. rejected Write attempts). Pass nil for no logging.

Callers 15

makeStreamFunction · 0.92
newV2HarnessFunction · 0.92
newV2SessionFunction · 0.92
NewFunction · 0.92
TestWriteRejectedFunction · 0.70
TestReadFromChunksFunction · 0.70

Calls 1

newWithLoggerFunction · 0.85

Tested by 15

makeStreamFunction · 0.74
newV2HarnessFunction · 0.74
newV2SessionFunction · 0.74
TestWriteRejectedFunction · 0.56
TestReadFromChunksFunction · 0.56