Documentation ¶
Index ¶
Constants ¶
View Source
const (
Driver drivers.DBDriver = "redis"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Driver drivers.DBDriver `json:"driver"` Host string `json:"host"` Port int64 `json:"port"` Auth string `json:"auth"` DB int64 `json:"db"` Retries int64 `json:"retries"` DialTimeout int64 `json:"dial_timeout"` ReadTimeout int64 `json:"read_timeout"` WriteTimeout int64 `json:"write_timeout"` Pool *ConnectionPool `json:"pool"` }
func (*Connection) GetDriver ¶
func (i *Connection) GetDriver() drivers.DBDriver
func (*Connection) IsDebug ¶
func (i *Connection) IsDebug() bool
func (*Connection) NewConnector ¶
func (i *Connection) NewConnector(name string) (drivers.ConnectorInterface, error)
type ConnectionPool ¶
type RedisConnector ¶
type RedisConnector struct {
// contains filtered or unexported fields
}
func NewRedisConnector ¶
func NewRedisConnector(connection string, config *Connection) (*RedisConnector, error)
func (*RedisConnector) Connect ¶
func (i *RedisConnector) Connect() error
func (*RedisConnector) GetConnection ¶
func (i *RedisConnector) GetConnection() string
func (*RedisConnector) GetDB ¶
func (i *RedisConnector) GetDB() any
func (*RedisConnector) GetDriver ¶
func (i *RedisConnector) GetDriver() drivers.DriverInterface
Click to show internal directories.
Click to hide internal directories.