driver

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported = errors.New("not supported")
	ErrDSNEmpty     = errors.New("dsn is empty")
	ErrConnClosed   = errors.New("connection closed")
	ErrBeforeCommit = errors.New("transaction is not committed")
	ErrNotInTx      = errors.New("not in transaction")
	ErrInTx         = errors.New("already in transaction")
)

Functions

func NewRedshiftConnector

func NewRedshiftConnector(cfg RedshiftConfig) driver.Connector

Types

type RedshiftConfig

type RedshiftConfig struct {
	ClusterIdentifier   string        `json:"clusterIdentifier"`
	Database            string        `json:"database"`
	DbUser              string        `json:"user"`
	WorkgroupName       string        `json:"workgroupName"`
	SecretsARN          string        `json:"secretsARN"`
	Region              string        `json:"region"`
	SharedConfigProfile string        `json:"sharedConfigProfile"`
	AccessKeyID         string        `json:"accessKeyId"`
	SecretAccessKey     string        `json:"secretAccessKey"`
	SessionToken        string        `json:"sessionToken"`
	RoleARN             string        `json:"roleARN"`
	RoleARNExpiry       time.Duration `json:"roleARNExpiry"` // default: 15m
	ExternalID          string        `json:"externalID"`
	Timeout             time.Duration `json:"timeout"`          // default: no timeout
	MinPolling          time.Duration `json:"polling"`          // default: 10ms
	MaxPolling          time.Duration `json:"maxPolling"`       // default: 5s
	RetryMaxAttempts    int           `json:"retryMaxAttempts"` // default: 20

	Params url.Values
}

func ParseDSN

func ParseDSN(dsn string) (*RedshiftConfig, error)

func (*RedshiftConfig) GetMaxPolling

func (cfg *RedshiftConfig) GetMaxPolling() time.Duration

func (*RedshiftConfig) GetMinPolling

func (cfg *RedshiftConfig) GetMinPolling() time.Duration

func (*RedshiftConfig) GetRetryMaxAttempts added in v1.1.4

func (cfg *RedshiftConfig) GetRetryMaxAttempts() int

func (*RedshiftConfig) LoadOpts

func (cfg *RedshiftConfig) LoadOpts(ctx context.Context) ([]func(*config.LoadOptions) error, error)

func (*RedshiftConfig) Opts

func (cfg *RedshiftConfig) Opts() []func(*redshiftdata.Options)

func (*RedshiftConfig) Sanitize added in v1.1.4

func (cfg *RedshiftConfig) Sanitize()

func (*RedshiftConfig) String

func (cfg *RedshiftConfig) String() string

Jump to

Keyboard shortcuts

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