Documentation
¶
Index ¶
- func NewBreaker(cfg CircuitBreakerConfig) *gobreaker.CircuitBreaker
- type CircuitBreakerConfig
- type Cluster
- func (c *Cluster) Del(ctx context.Context, keys ...string) (int64, error)
- func (c *Cluster) Exists(ctx context.Context, keys ...string) (int64, error)
- func (c *Cluster) Expire(ctx context.Context, key string, ttl time.Duration) (bool, error)
- func (c *Cluster) Get(ctx context.Context, key string) (string, error)
- func (c *Cluster) GetDel(ctx context.Context, key string) (string, error)
- func (c *Cluster) HDel(ctx context.Context, key string, fields ...string) (int64, error)
- func (c *Cluster) HGet(ctx context.Context, key, field string) (string, error)
- func (c *Cluster) HSet(ctx context.Context, key string, values ...interface{}) error
- func (c *Cluster) Incr(ctx context.Context, key string) (int64, error)
- func (c *Cluster) IsAlive() bool
- func (c *Cluster) Keys(ctx context.Context, pattern string) ([]string, error)
- func (c *Cluster) Persist(ctx context.Context, key string) (bool, error)
- func (c *Cluster) PingAll(ctx context.Context) bool
- func (c *Cluster) Rename(ctx context.Context, oldKey, newKey string) error
- func (c *Cluster) RenameNX(ctx context.Context, oldKey, newKey string) (bool, error)
- func (c *Cluster) SAdd(ctx context.Context, key string, members ...interface{}) (int64, error)
- func (c *Cluster) SCard(ctx context.Context, key string) (int64, error)
- func (c *Cluster) SIsMember(ctx context.Context, key string, member interface{}) (bool, error)
- func (c *Cluster) SMIsMember(ctx context.Context, key string, members ...interface{}) ([]bool, error)
- func (c *Cluster) SMembers(ctx context.Context, key string) ([]string, error)
- func (c *Cluster) SRem(ctx context.Context, key string, members ...interface{}) (int64, error)
- func (c *Cluster) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
- func (c *Cluster) TTL(ctx context.Context, key string) (time.Duration, error)
- func (c *Cluster) Touch(ctx context.Context, key string, ttl time.Duration) error
- type ClusterConfig
- type Config
- type RetryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBreaker ¶
func NewBreaker(cfg CircuitBreakerConfig) *gobreaker.CircuitBreaker
Types ¶
type CircuitBreakerConfig ¶
type Cluster ¶
type Cluster struct { Client *redis.ClusterClient IsAvailable atomic.Bool // contains filtered or unexported fields }
func (*Cluster) Keys ¶ added in v0.0.27
Keys returns all keys matching the pattern (use with caution in production)
func (*Cluster) RenameNX ¶ added in v0.0.27
RenameNX renames a key only if the new key does not exist
func (*Cluster) SMIsMember ¶ added in v0.0.26
func (c *Cluster) SMIsMember(ctx context.Context, key string, members ...interface{}) ([]bool, error)
SMIsMember checks if multiple members exist in a set. Returns a slice of booleans
func (*Cluster) Set ¶
func (c *Cluster) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
Set sets a key with a given value and expiration
type ClusterConfig ¶ added in v0.0.18
Click to show internal directories.
Click to hide internal directories.