dial

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 2

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