Documentation
¶
Index ¶
- type InternalConnPool
- type InternalPoolConfig
- type InternalPoolOption
- type InternalPooledConnectionProvider
- func NewInternalPooledConnectionProvider(internalPoolOptions *InternalPoolConfig, poolExpirationDuration time.Duration) *InternalPooledConnectionProvider
- func NewInternalPooledConnectionProviderWithPoolKeyFunc(internalPoolOptions *InternalPoolConfig, poolExpirationDuration time.Duration, ...) *InternalPooledConnectionProvider
- func (p *InternalPooledConnectionProvider) AcceptsStrategy(strategy string) bool
- func (p *InternalPooledConnectionProvider) AcceptsUrl(hostInfo host_info_util.HostInfo, _ map[string]string) bool
- func (p *InternalPooledConnectionProvider) Connect(hostInfo *host_info_util.HostInfo, props map[string]string, ...) (driver.Conn, error)
- func (p *InternalPooledConnectionProvider) GetHostInfoByStrategy(hosts []*host_info_util.HostInfo, role host_info_util.HostRole, ...) (*host_info_util.HostInfo, error)
- func (p *InternalPooledConnectionProvider) GetHostSelectorStrategy(strategy string) (driver_infrastructure.HostSelector, error)
- func (p *InternalPooledConnectionProvider) ReleaseResources()
- type PoolKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InternalConnPool ¶
type InternalConnPool struct {
// contains filtered or unexported fields
}
func NewConnPool ¶
func NewConnPool(factory func() (driver.Conn, error), opts *InternalPoolConfig) *InternalConnPool
func (*InternalConnPool) Close ¶
func (p *InternalConnPool) Close() error
type InternalPoolConfig ¶
type InternalPoolConfig struct {
// contains filtered or unexported fields
}
func NewInternalPoolOptions ¶
func NewInternalPoolOptions(opts ...InternalPoolOption) *InternalPoolConfig
func (*InternalPoolConfig) GetMaxConnIdleTime ¶
func (c *InternalPoolConfig) GetMaxConnIdleTime() time.Duration
func (*InternalPoolConfig) GetMaxConnLifetime ¶
func (c *InternalPoolConfig) GetMaxConnLifetime() time.Duration
func (*InternalPoolConfig) GetMaxIdleConns ¶
func (c *InternalPoolConfig) GetMaxIdleConns() int
type InternalPoolOption ¶
type InternalPoolOption func(*InternalPoolConfig)
func WithMaxConnIdleTime ¶
func WithMaxConnIdleTime(d time.Duration) InternalPoolOption
func WithMaxConnLifetime ¶
func WithMaxConnLifetime(d time.Duration) InternalPoolOption
func WithMaxIdleConns ¶
func WithMaxIdleConns(n int) InternalPoolOption
type InternalPooledConnectionProvider ¶
type InternalPooledConnectionProvider struct {
// contains filtered or unexported fields
}
func NewInternalPooledConnectionProvider ¶
func NewInternalPooledConnectionProvider(internalPoolOptions *InternalPoolConfig, poolExpirationDuration time.Duration) *InternalPooledConnectionProvider
func NewInternalPooledConnectionProviderWithPoolKeyFunc ¶
func NewInternalPooledConnectionProviderWithPoolKeyFunc(internalPoolOptions *InternalPoolConfig, poolExpirationDuration time.Duration, poolKeyFunc internalPoolKeyFunc) *InternalPooledConnectionProvider
func (*InternalPooledConnectionProvider) AcceptsStrategy ¶
func (p *InternalPooledConnectionProvider) AcceptsStrategy(strategy string) bool
func (*InternalPooledConnectionProvider) AcceptsUrl ¶
func (p *InternalPooledConnectionProvider) AcceptsUrl(hostInfo host_info_util.HostInfo, _ map[string]string) bool
func (*InternalPooledConnectionProvider) Connect ¶
func (p *InternalPooledConnectionProvider) Connect(hostInfo *host_info_util.HostInfo, props map[string]string, pluginService driver_infrastructure.PluginService) (driver.Conn, error)
func (*InternalPooledConnectionProvider) GetHostInfoByStrategy ¶
func (p *InternalPooledConnectionProvider) GetHostInfoByStrategy(hosts []*host_info_util.HostInfo, role host_info_util.HostRole, strategy string, props map[string]string) (*host_info_util.HostInfo, error)
func (*InternalPooledConnectionProvider) GetHostSelectorStrategy ¶
func (p *InternalPooledConnectionProvider) GetHostSelectorStrategy(strategy string) (driver_infrastructure.HostSelector, error)
func (*InternalPooledConnectionProvider) ReleaseResources ¶
func (p *InternalPooledConnectionProvider) ReleaseResources()
type PoolKey ¶
type PoolKey struct {
// contains filtered or unexported fields
}
func (*PoolKey) GetDriverName ¶
func (*PoolKey) GetExtraKey ¶
Click to show internal directories.
Click to hide internal directories.