config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UserConfig
	TLSConfig     *tls.Config // nil disables TLS
	Authenticator string      //TODO for oauth

	RunAsync                  bool // TODO
	PollInterval              time.Duration
	ConnectTimeout            time.Duration // max time to open session
	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

func (*Config) DeepCopy

func (c *Config) DeepCopy() *Config

func (*Config) ToEndpointURL

func (c *Config) ToEndpointURL() string

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
	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
}

UserConfig is the set of configurations exposed to users

func ParseDSN

func ParseDSN(dsn string) (UserConfig, error)

func (UserConfig) DeepCopy

func (ucfg UserConfig) DeepCopy() UserConfig

func (UserConfig) WithDefaults

func (ucfg UserConfig) WithDefaults() UserConfig

Jump to

Keyboard shortcuts

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