Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- type ClientType
- type Option
- func WithDialTimeout(dialTimeout time.Duration) Option
- func WithLogger(logger *zap.Logger) Option
- func WithMaxRetries(maxRetries int) Option
- func WithMetrics(r metrics.Registerer) Option
- func WithMinIdleConns(minIdleConns int) Option
- func WithPassword(password string) Option
- func WithPoolSize(poolSize int) Option
- func WithPoolTimeout(poolTimeout time.Duration) Option
- func WithServerName(serverName string) Option
- type PipeClient
Constants ¶
View Source
const (
RedisClusterSlots = 16384
)
View Source
const (
SetNXCmdName = "SETNX"
)
Variables ¶
View Source
var ( ErrNil = goredis.Nil ErrInvalidType = errors.New("redis: invalid type") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Close() error Check(context.Context) health.Status Stats() redis.PoolStats Scan(cursor uint64, key string, count int64) (uint64, []string, error) Get(key string) ([]byte, error) GetMulti(keys []string, ignoreNotFound bool) ([]interface{}, error) Set(key string, val interface{}, expiration time.Duration) error PFAdd(key string, els ...string) (int64, error) PFCount(keys ...string) (int64, error) PFMerge(dest string, expiration time.Duration, keys ...string) error IncrByFloat(key string, value float64) (float64, error) Del(key string) error Incr(key string) (int64, error) Pipeline(tx bool) PipeClient Expire(key string, expiration time.Duration) (bool, error) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error) Eval(ctx context.Context, script string, keys []string, args ...interface{}) *goredis.Cmd Dump(key string) (string, error) Restore(key string, ttl int64, value string) error Exists(key string) (int64, error) }
type ClientType ¶ added in v0.4.9
type ClientType int
const ( ClientTypeStandard ClientType = iota ClientTypeCluster )
type Option ¶
type Option func(*options)
func WithDialTimeout ¶
func WithLogger ¶
func WithMaxRetries ¶
func WithMetrics ¶
func WithMetrics(r metrics.Registerer) Option
func WithMinIdleConns ¶
func WithPassword ¶
func WithPoolSize ¶
func WithPoolTimeout ¶
func WithServerName ¶
type PipeClient ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.