Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI Redis 交互式命令行客户端
func NewCLIWithConfig ¶
NewCLIWithConfig 使用配置创建 Redis CLI 实例
type Config ¶
type Config struct {
Host string
Port int
Password string
DB int // 数据库编号,默认 0
DialTimeout time.Duration // 拨号超时,默认 10s
ReadTimeout time.Duration // 读超时,默认 30s
WriteTimeout time.Duration // 写超时,默认 30s
PoolSize int // 连接池大小,默认 10
MinIdleConns int // 最小空闲连接,默认 2
MaxRetries int // 最大重试次数,默认 3
PoolTimeout time.Duration // 连接池超时,默认 4s
IdleTimeout time.Duration // 空闲连接超时,默认 5min
Username string // Redis 6.0+ 用户名
TLSEnabled bool // 是否启用 TLS
CustomParams map[string]interface{} // 自定义参数
}
Config Redis 连接配置
type ReadWriteCloser ¶ added in v0.1.1
type ReadWriteCloser struct {
io.ReadWriter
}
ReadWriteCloser wraps io.ReadWriter to add a no-op Close method
func (*ReadWriteCloser) Close ¶ added in v0.1.1
func (rwc *ReadWriteCloser) Close() error
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader 从终端读取输入(使用 readline 以支持SSH session)
Click to show internal directories.
Click to hide internal directories.