db

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2016 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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