Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStoreWithOptions ¶
NewStoreWithOptions returns an instance of redis store with options.
Types ¶
type Client ¶
type Client interface {
Ping() *libredis.StatusCmd
Get(key string) *libredis.StringCmd
Set(key string, value interface{}, expiration time.Duration) *libredis.StatusCmd
Watch(handler func(*libredis.Tx) error, keys ...string) error
Del(keys ...string) *libredis.IntCmd
SetNX(key string, value interface{}, expiration time.Duration) *libredis.BoolCmd
Eval(script string, keys []string, args ...interface{}) *libredis.Cmd
}
Client is an interface thats allows to use a redis cluster or a redis single client seamlessly.
type Store ¶
type Store struct {
// Prefix used for the key.
Prefix string
// MaxRetry is the maximum number of retry under race conditions.
MaxRetry int
// contains filtered or unexported fields
}
Store is the redis store.
Click to show internal directories.
Click to hide internal directories.