Documentation
Overview ¶
Package redis implements storage.Interface into a Redis instance.
Index ¶
Constants ¶
View Source
const Format = "redis"
Format is the format name registered by this package.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage implements storage.Interface by dispatching to a Redis client, pool, or cluster. The keys manipulated by this wrapper may be optionally given a fixed prefix, permitting multiple independent stores to co-exist on the same server.
In addition to the user-defined prefix, blobs are given the prefix "id:". For example, if the user prefix is "xx", then a blob with ID "foo" will be stored as "xx:id:foo".
func (*Storage) Close ¶
Close implements io.Closer. If the Cmder passed to New implements io.Closer, it is closed; otherwise this is a no-op.