Documentation ¶
Index ¶
Constants ¶
View Source
const BundleName = "sql"
BundleName is default definition name.
View Source
const DEFAULT = "default"
DEFAULT is default connection name.
Variables ¶
View Source
var ( // ErrUnknownConnection is error triggered when connection with provided name not founded. ErrUnknownConnection = errors.New("unknown connection") )
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct{}
Bundle implements the glue.Bundle interface.
type Config ¶
type Config struct { Nodes []string `json:"nodes"` Driver string `json:"driver"` MaxOpenConns int `json:"max_open_conns"` MaxIdleConns int `json:"max_idle_conns"` ConnMaxLifetime time.Duration `json:"conn_max_lifetime"` }
Config is registry configuration item.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is database connection registry.
func (*Registry) Connection ¶
Connection is default connection getter.
func (*Registry) ConnectionWithName ¶
ConnectionWithName is connection getter by name.
Click to show internal directories.
Click to hide internal directories.