Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNetwork network error ErrNetwork = errors.New("Network error or connection refused") // ErrNoConnection there is no no connection in the pool and no way to create a new one ErrNoConnection = errors.New("No connection available") )
View Source
var (
DebugLogEnabled = false
)
View Source
var ( // DefaultHealthCheckPeriod is default period to do health checks on failed dbs DefaultHealthCheckPeriod = 40 * time.Millisecond )
Functions ¶
func RequireMasterCtx ¶
RequireMasterCtx creates a new context instructing the path to use masters only
Types ¶
type Driver ¶
type Driver interface { DriverName() string SetMaxOpenConns(n int) GetMaxOpenConns() int SetMaxIdleConns(n int) GetMaxIdleConns() int SetMaxConnLifetime(d time.Duration) GetMaxConnLifetime() time.Duration SetMaxRetryCount(retry int) GetMaxRetryCount() int }
Click to show internal directories.
Click to hide internal directories.