Documentation ¶
Index ¶
Constants ¶
View Source
const PluginName = "db.sql"
Variables ¶
View Source
var ErrConfigNotFound = errors.New("sql driver config not found")
Functions ¶
This section is empty.
Types ¶
type ChannelsConfig ¶
type Config ¶
type Config struct { DriverName string `mapstructure:"driver_name" json:"driver_name,omitempty" yaml:"driver_name,omitempty"` DataSourceName string `mapstructure:"dsn" json:"dsn,omitempty" yaml:"data_source_name,omitempty"` Ping bool `mapstructure:"ping" json:"ping,omitempty" yaml:"ping,omitempty"` MaxIdleConns *int `mapstructure:"max_idle_conns" json:"max_idle_conns,omitempty" yaml:"max_idle_conns,omitempty"` MaxOpenConns *int `mapstructure:"max_open_conns" json:"max_open_conns,omitempty" yaml:"max_open_conns,omitempty"` ConnMaxLifetime *time.Duration `mapstructure:"conn_max_lifetime" json:"conn_max_lifetime,omitempty" yaml:"conn_max_lifetime,omitempty"` ConnMaxIdleTime *time.Duration `mapstructure:"conn_max_idle_time" json:"conn_max_idle_time,omitempty" yaml:"conn_max_idle_time,omitempty"` }
type Configurer ¶
type DBOpener ¶
type DBOpener struct { io.Closer Channels map[string]*Channel // contains filtered or unexported fields }
func (*DBOpener) AddChannel ¶
Click to show internal directories.
Click to hide internal directories.