(lis *inProcessListener)
| 96 | func (inProcessListener) Addr() net.Addr { return inProcessAddr("in-process") } |
| 97 | |
| 98 | func inProcessDialer(lis *inProcessListener) func(context.Context, string) (net.Conn, error) { |
| 99 | return func(ctx context.Context, addr string) (net.Conn, error) { |
| 100 | server, client := net.Pipe() |
| 101 | select { |
| 102 | case <-ctx.Done(): |
| 103 | return nil, ctx.Err() |
| 104 | case lis.ch <- server: |
| 105 | return client, nil |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | // StartLoopback starts the server on a local address and returns a connection to that address. |
| 111 | // This function does not add the default DialOptions. |
no test coverage detected