dialer

package
v1.70.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	Config        *tls.Config
	Dialer        func(ctx context.Context, network, address string) (net.Conn, error)
	Meter         *metrics.Scope
	Logger        *zap.Logger
	ServiceName   string
	TransportName string
	Dest          string
}

Params holds parameters needed for creating new TLSDialer.

type TLSDialer

type TLSDialer struct {
	// contains filtered or unexported fields
}

TLSDialer implements context dialer which creates TLS client connection and completes handshake using the connection created from underlying dialer.

func NewTLSDialer

func NewTLSDialer(p Params) *TLSDialer

NewTLSDialer returns dialer which creates TLS client connection based on the given TLS configuration.

func (*TLSDialer) DialContext

func (t *TLSDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error)

DialContext returns a TLS client connection after finishing the handshake.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL