refactor(netx): extract tlsdialer from dialer

This commit is contained in:
Simone Basso 2021-06-08 11:24:13 +02:00
commit 704e5bd870
18 changed files with 699 additions and 494 deletions

View file

@ -2,7 +2,6 @@ package dialer
import (
"context"
"crypto/tls"
"io"
"net"
"time"
@ -69,12 +68,3 @@ func (EOFAddr) Network() string {
func (EOFAddr) String() string {
return "127.0.0.1:1234"
}
type EOFTLSHandshaker struct{}
func (EOFTLSHandshaker) Handshake(
ctx context.Context, conn net.Conn, config *tls.Config,
) (net.Conn, tls.ConnectionState, error) {
time.Sleep(10 * time.Microsecond)
return nil, tls.ConnectionState{}, io.EOF
}