ProxyServer represents a test proxy server.
| 35 | |
| 36 | // ProxyServer represents a test proxy server. |
| 37 | type ProxyServer struct { |
| 38 | lis net.Listener |
| 39 | in net.Conn // Connection from the client to the proxy. |
| 40 | out net.Conn // Connection from the proxy to the backend. |
| 41 | onRequest func(*http.Request) // Function to check the request sent to proxy. |
| 42 | Addr string // Address of the proxy |
| 43 | } |
| 44 | |
| 45 | const defaultTestTimeout = 10 * time.Second |
| 46 |
nothing calls this directly
no outgoing calls
no test coverage detected