redis

package
v0.4.62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 5 Imported by: 0

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 ConnectionPool struct {
	Size         int64 `json:"size"`
	MinIdleConns int64 `json:"min_idle_conns"`
	PoolTimeout  int64 `json:"pool_timeout"`
	IdleTimeout  int64 `json:"idle_timeout"`
}

type Connector added in v0.4.33

type Connector struct {
	// contains filtered or unexported fields
}

func NewRedisConnector

func NewRedisConnector(connection string, config *Connection) (*Connector, error)

func (*Connector) Connect added in v0.4.33

func (i *Connector) Connect() error

func (*Connector) GetConnection added in v0.4.33

func (i *Connector) GetConnection() string

func (*Connector) GetDB added in v0.4.33

func (i *Connector) GetDB() any

func (*Connector) GetDriver added in v0.4.33

func (i *Connector) GetDriver() drivers.DriverInterface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL