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

db

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnectionPool

func GetConnectionPool(dbConfig Config) (*sqlx.DB, error)

Types

type Config

type Config struct {
	Type             string `json:"type" validate:"nonzero"`
	ConnectionString string `json:"connection_string" validate:"nonzero"`
}

type RetriableConnector

type RetriableConnector struct {
	Connector     func(Config) (*sqlx.DB, error)
	Sleeper       sleeper
	RetryInterval time.Duration
	MaxRetries    int
}

func (*RetriableConnector) GetConnectionPool

func (r *RetriableConnector) GetConnectionPool(dbConfig Config) (*sqlx.DB, error)

type RetriableError

type RetriableError struct {
	Inner error
	Msg   string
}

func (RetriableError) Error

func (r RetriableError) Error() string

type SleeperFunc

type SleeperFunc func(time.Duration)

func (SleeperFunc) Sleep

func (sf SleeperFunc) Sleep(duration time.Duration)

Jump to

Keyboard shortcuts

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