redis

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheWithRedis

func CacheWithRedis(reg *register.Register)

func CacheWithRedisCluster

func CacheWithRedisCluster(reg *register.Register)

Types

type RedisClusterComponent

type RedisClusterComponent struct {
	URLs        []string `toml:"urls" json:"urls"`
	Username    string   `toml:"username" json:"username"`
	Password    string   `toml:"password" json:"password"`
	PoolSize    int      `toml:"pool_size" json:"pool_size"`
	PoolTimeout int      `toml:"pool_timeout" json:"pool_timeout"`
	// contains filtered or unexported fields
}

func (*RedisClusterComponent) Del

func (rds *RedisClusterComponent) Del(key string) error

func (*RedisClusterComponent) Exists

func (rds *RedisClusterComponent) Exists(key string) bool

func (*RedisClusterComponent) Expire

func (rds *RedisClusterComponent) Expire(key string, expiration time.Duration) error

func (*RedisClusterComponent) Get

func (rds *RedisClusterComponent) Get(key string) (string, error)

func (*RedisClusterComponent) HDel

func (rds *RedisClusterComponent) HDel(key, field string) error

func (*RedisClusterComponent) HExists

func (rds *RedisClusterComponent) HExists(key, field string) bool

func (*RedisClusterComponent) HGet

func (rds *RedisClusterComponent) HGet(key, field string) (string, error)

func (*RedisClusterComponent) HGetALl

func (rds *RedisClusterComponent) HGetALl(key, field string) (map[string]string, error)

func (*RedisClusterComponent) HSet

func (rds *RedisClusterComponent) HSet(key, field string, value interface{}) error

------- Hash --------

func (*RedisClusterComponent) Init

func (rds *RedisClusterComponent) Init() error

func (*RedisClusterComponent) LPop

func (rds *RedisClusterComponent) LPop(key string) (string, error)

func (*RedisClusterComponent) LPush

func (rds *RedisClusterComponent) LPush(key string, values ...interface{}) error

------- LIST --------

func (*RedisClusterComponent) Name

func (rds *RedisClusterComponent) Name() string

func (*RedisClusterComponent) RPop

func (rds *RedisClusterComponent) RPop(key string) (string, error)

func (*RedisClusterComponent) Ready

func (rds *RedisClusterComponent) Ready()

func (*RedisClusterComponent) Set

func (rds *RedisClusterComponent) Set(key string, value interface{}, expiration ...time.Duration) error

------- string --------

type RedisComponent

type RedisComponent struct {
	Addr        string `toml:"addr" json:"addr"`
	Username    string `toml:"username" json:"username"`
	Password    string `toml:"password" json:"password"`
	PoolSize    int    `toml:"pool_size" json:"pool_size"`
	PoolTimeout int    `toml:"pool_timeout" json:"pool_timeout"`
	// contains filtered or unexported fields
}

func (*RedisComponent) Del

func (rds *RedisComponent) Del(key string) error

func (*RedisComponent) Exists

func (rds *RedisComponent) Exists(key string) bool

func (*RedisComponent) Expire

func (rds *RedisComponent) Expire(key string, expiration time.Duration) error

func (*RedisComponent) Get

func (rds *RedisComponent) Get(key string) (string, error)

func (*RedisComponent) HDel

func (rds *RedisComponent) HDel(key, field string) error

func (*RedisComponent) HExists

func (rds *RedisComponent) HExists(key, field string) bool

func (*RedisComponent) HGet

func (rds *RedisComponent) HGet(key, field string) (string, error)

func (*RedisComponent) HGetALl

func (rds *RedisComponent) HGetALl(key, field string) (map[string]string, error)

func (*RedisComponent) HSet

func (rds *RedisComponent) HSet(key, field string, value interface{}) error

------- Hash --------

func (*RedisComponent) Init

func (rds *RedisComponent) Init() error

func (*RedisComponent) LPop

func (rds *RedisComponent) LPop(key string) (string, error)

func (*RedisComponent) LPush

func (rds *RedisComponent) LPush(key string, values ...interface{}) error

------- LIST --------

func (*RedisComponent) Name

func (rds *RedisComponent) Name() string

func (*RedisComponent) RPop

func (rds *RedisComponent) RPop(key string) (string, error)

func (*RedisComponent) Ready

func (rds *RedisComponent) Ready()

func (*RedisComponent) Set

func (rds *RedisComponent) Set(key string, value interface{}, expiration ...time.Duration) error

------- string --------

Jump to

Keyboard shortcuts

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