dialer_config

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IpTypePublic  = "PUBLIC"
	IpTypePrivate = "PRIVATE"

	DefaultPort = "3307"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IpType    string
	Port      string
	NetDialer *net.Dialer
	// RefreshBuffer is how long before its expiry a client certificate is replaced.
	RefreshBuffer time.Duration
	Now           func() time.Time
}

func New

func New(options ...Option) *Config

type Option

type Option func(*Config)

func WithIpType

func WithIpType(ipType string) Option

func WithNetDialer

func WithNetDialer(netDialer *net.Dialer) Option

func WithNow

func WithNow(now func() time.Time) Option

func WithPort

func WithPort(port string) Option

WithPort replaces the server-side proxy port, for tests.

func WithRefreshBuffer

func WithRefreshBuffer(refreshBuffer time.Duration) Option

Jump to

Keyboard shortcuts

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