db

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 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"`
	ConnectionString string `json:"connection_string"`
}

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