Documentation ¶
Index ¶
- Variables
- func NewOption(opts ...optionFn) *option
- func WithAddr(addr string) optionFn
- func WithDB(db int) optionFn
- func WithPassword(password string) optionFn
- type RedisDriver
- func (d *RedisDriver) Lock(key string) (bool, error)
- func (d *RedisDriver) Ping() error
- func (d *RedisDriver) PipelineIncr()
- func (d *RedisDriver) StringDel(key string) bool
- func (d *RedisDriver) StringGet(key string) string
- func (d *RedisDriver) StringSet(key, value string) bool
- func (d *RedisDriver) Transaction(key string) error
- func (d *RedisDriver) TryPub(channel, message string)
- func (d *RedisDriver) TrySub(channel string) string
- func (d *RedisDriver) UnLock(key string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOption = option{ // contains filtered or unexported fields }
Functions ¶
func WithPassword ¶
func WithPassword(password string) optionFn
Types ¶
type RedisDriver ¶
type RedisDriver struct {
// contains filtered or unexported fields
}
func NewRedisDriver ¶
func NewRedisDriver(opt *option) (*RedisDriver, error)
func (*RedisDriver) PipelineIncr ¶
func (d *RedisDriver) PipelineIncr()
func (*RedisDriver) StringDel ¶
func (d *RedisDriver) StringDel(key string) bool
func (*RedisDriver) StringSet ¶
func (d *RedisDriver) StringSet(key, value string) bool
func (*RedisDriver) Transaction ¶
func (d *RedisDriver) Transaction(key string) error
func (*RedisDriver) TryPub ¶
func (d *RedisDriver) TryPub(channel, message string)
func (*RedisDriver) TrySub ¶
func (d *RedisDriver) TrySub(channel string) string
Click to show internal directories.
Click to hide internal directories.