Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrowConfig added in v1.1.0

type ArrowConfig struct {
	UseArrowBatches         bool
	UseArrowNativeDecimal   bool
	UseArrowNativeTimestamp bool

	// the following are currently not supported
	UseArrowNativeComplexTypes  bool
	UseArrowNativeIntervalTypes bool
}

func (ArrowConfig) DeepCopy added in v1.1.0

func (arrowConfig ArrowConfig) DeepCopy() ArrowConfig

DeepCopy returns a true deep copy of UserConfig

func (ArrowConfig) WithDefaults added in v1.1.0

func (ucfg ArrowConfig) WithDefaults() ArrowConfig

type CloudFetchConfig added in v1.4.0

type CloudFetchConfig struct {
	UseCloudFetch      bool
	MaxDownloadThreads int
	MaxFilesInMemory   int
	MinTimeToExpiry    time.Duration
}

func (CloudFetchConfig) DeepCopy added in v1.4.0

func (cfg CloudFetchConfig) DeepCopy() CloudFetchConfig

func (CloudFetchConfig) WithDefaults added in v1.4.0

func (cfg CloudFetchConfig) WithDefaults() CloudFetchConfig

type Config

type Config struct {
	UserConfig
	TLSConfig *tls.Config // nil disables TLS
	ArrowConfig
	PollInterval              time.Duration
	ClientTimeout             time.Duration // max time the http request can last
	PingTimeout               time.Duration // max time allowed for ping
	CanUseMultipleCatalogs    bool
	DriverName                string
	DriverVersion             string
	ThriftProtocol            string
	ThriftTransport           string
	ThriftProtocolVersion     cli_service.TProtocolVersion
	ThriftDebugClientProtocol bool
}

Driver Configurations. Only UserConfig are currently exposed to users

func WithDefaults

func WithDefaults() *Config

WithDefaults provides default settings for Config

func (*Config) DeepCopy

func (c *Config) DeepCopy() *Config

DeepCopy returns a true deep copy of Config

func (*Config) ToEndpointURL

func (c *Config) ToEndpointURL() (string, error)

ToEndpointURL generates the endpoint URL from Config that a Thrift client will connect to

type UserConfig

type UserConfig struct {
	Protocol          string
	Host              string // from databricks UI
	Port              int    // from databricks UI
	HTTPPath          string // from databricks UI
	Catalog           string
	Schema            string
	Authenticator     auth.Authenticator
	AccessToken       string        // from databricks UI
	MaxRows           int           // max rows per page
	QueryTimeout      time.Duration // Timeout passed to server for query processing
	UserAgentEntry    string
	Location          *time.Location
	SessionParams     map[string]string
	RetryWaitMin      time.Duration
	RetryWaitMax      time.Duration
	RetryMax          int
	Transport         http.RoundTripper
	UseLz4Compression bool
	CloudFetchConfig
}

UserConfig is the set of configurations exposed to users

func ParseDSN

func ParseDSN(dsn string) (UserConfig, error)

ParseDSN constructs UserConfig and CloudFetchConfig by parsing DSN string supplied to `sql.Open()`

func (UserConfig) DeepCopy

func (ucfg UserConfig) DeepCopy() UserConfig

DeepCopy returns a true deep copy of UserConfig

func (UserConfig) WithDefaults

func (ucfg UserConfig) WithDefaults() UserConfig

WithDefaults provides default settings for optional fields in UserConfig

Jump to

Keyboard shortcuts

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