MCPcopy
hub / github.com/keploy/keploy / newWithLogger

Function newWithLogger

pkg/agent/proxy/fakeconn/fakeconn.go:104–118  ·  view source on GitHub ↗
(ch <-chan Chunk, localAddr, remoteAddr net.Addr, log logger)

Source from the content-addressed store, hash-verified

102}
103
104func newWithLogger(ch <-chan Chunk, localAddr, remoteAddr net.Addr, log logger) *FakeConn {
105 if localAddr == nil {
106 localAddr = placeholderAddr{label: "fakeconn-local"}
107 }
108 if remoteAddr == nil {
109 remoteAddr = placeholderAddr{label: "fakeconn-remote"}
110 }
111 return &FakeConn{
112 ch: ch,
113 logger: log,
114 closeCh: make(chan struct{}),
115 local: localAddr,
116 remote: remoteAddr,
117 }
118}
119
120// Read implements io.Reader / net.Conn. It first drains any bytes
121// left over from a previous Chunk, then blocks for the next Chunk

Callers 2

NewFunction · 0.85
NewWithLoggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected