dial

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dial provides types to implement go-hdb custom dialers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, address string, options DialerOptions) (net.Conn, error)
}

The Dialer interface needs to be implemented by custom Dialers. A Dialer for providing a custom driver connection to the database can be set in the driver.Connector object.

var DefaultDialer Dialer = &tcp4PrefDialer{}

DefaultDialer is the default driver Dialer implementation. TCP4 connections are preferred over TCP6 connections until HANA Cloud fully supports IPv6. see https://github.com/SAP/go-hdb/issues/157.

type DialerOptions

type DialerOptions struct {
	Timeout time.Duration
	// TCPKeepAlive mirrors net.Dialer.KeepAlive 1:1: zero uses the
	// net default (15s), a negative value disables keep-alive. Under
	// net.Dialer semantics KeepAlive is ignored whenever
	// TCPKeepAliveConfig is enabled.
	TCPKeepAlive       time.Duration
	TCPKeepAliveConfig net.KeepAliveConfig
}

DialerOptions contains optional parameters that might be used by a Dialer.

Jump to

Keyboard shortcuts

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