dialer

package
v0.71.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConnectionTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DialeFn

type DialeFn interface {
	// Dial connects to address. serverName, when non-empty, overrides the TLS
	// ServerName used for SNI/cert validation. Empty means derive from address.
	Dial(ctx context.Context, address, serverName string) (net.Conn, error)
	Protocol() string
}

type RaceDial

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

func NewRaceDial

func NewRaceDial(log *log.Entry, connectionTimeout time.Duration, serverURL string, dialerFns ...DialeFn) *RaceDial

func (*RaceDial) Dial

func (r *RaceDial) Dial(ctx context.Context) (net.Conn, error)

func (*RaceDial) WithServerName added in v0.70.5

func (r *RaceDial) WithServerName(serverName string) *RaceDial

WithServerName sets a TLS SNI/cert validation override. Used when serverURL contains an IP literal but the cert is issued for a different hostname.

Mutates the receiver and is not safe for concurrent reconfiguration; a RaceDial is intended to be constructed per dial and discarded.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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