Documentation ¶
Index ¶
- type ClusterAdapter
- func (r *ClusterAdapter) Delete(key string) error
- func (r *ClusterAdapter) DeleteBatchFilteredKey(filterKeyPrefix string) error
- func (r *ClusterAdapter) DeleteStr(key string) error
- func (r *ClusterAdapter) Get(key string, t ...reflect.Type) interface{}
- func (r *ClusterAdapter) GetClient() *redis.ClusterClient
- func (r *ClusterAdapter) GetCountsFilteredKey(filterKeyPrefix string) (int, error)
- func (r *ClusterAdapter) GetStr(key string) string
- func (r *ClusterAdapter) GetStrTimeout(key string) int64
- func (r *ClusterAdapter) GetTimeout(key string) int64
- func (r *ClusterAdapter) Serialize(session *model.Session) ([]byte, error)
- func (r *ClusterAdapter) Set(key string, value interface{}, timeout int64) error
- func (r *ClusterAdapter) SetSerializer(serializer persist.Serializer)
- func (r *ClusterAdapter) SetStr(key string, value string, timeout int64) error
- func (r *ClusterAdapter) UnSerialize(bytes []byte) (*model.Session, error)
- func (r *ClusterAdapter) Update(key string, value interface{}) error
- func (r *ClusterAdapter) UpdateStr(key string, value string) error
- func (r *ClusterAdapter) UpdateStrTimeout(key string, timeout int64) error
- func (r *ClusterAdapter) UpdateTimeout(key string, timeout int64) error
- type RedisAdapter
- func (r *RedisAdapter) Delete(key string) error
- func (r *RedisAdapter) DeleteBatchFilteredKey(filterKeyPrefix string) error
- func (r *RedisAdapter) DeleteStr(key string) error
- func (r *RedisAdapter) Get(key string, t ...reflect.Type) interface{}
- func (r *RedisAdapter) GetClient() *redis.Client
- func (r *RedisAdapter) GetStr(key string) string
- func (r *RedisAdapter) GetStrTimeout(key string) int64
- func (r *RedisAdapter) GetTimeout(key string) int64
- func (r *RedisAdapter) Set(key string, value interface{}, timeout int64) error
- func (r *RedisAdapter) SetSerializer(serializer persist.Serializer)
- func (r *RedisAdapter) SetStr(key string, value string, timeout int64) error
- func (r *RedisAdapter) Update(key string, value interface{}) error
- func (r *RedisAdapter) UpdateStr(key string, value string) error
- func (r *RedisAdapter) UpdateStrTimeout(key string, timeout int64) error
- func (r *RedisAdapter) UpdateTimeout(key string, timeout int64) error
- type RingAdapter
- func (r *RingAdapter) Delete(key string) error
- func (r *RingAdapter) DeleteBatchFilteredKey(filterKeyPrefix string) error
- func (r *RingAdapter) DeleteStr(key string) error
- func (r *RingAdapter) Get(key string, t ...reflect.Type) interface{}
- func (r *RingAdapter) GetClient() *redis.Ring
- func (r *RingAdapter) GetCountsFilteredKey(filterKeyPrefix string) (int, error)
- func (r *RingAdapter) GetStr(key string) string
- func (r *RingAdapter) GetStrTimeout(key string) int64
- func (r *RingAdapter) GetTimeout(key string) int64
- func (r *RingAdapter) Set(key string, value interface{}, timeout int64) error
- func (r *RingAdapter) SetSerializer(serializer persist.Serializer)
- func (r *RingAdapter) SetStr(key string, value string, timeout int64) error
- func (r *RingAdapter) Update(key string, value interface{}) error
- func (r *RingAdapter) UpdateStr(key string, value string) error
- func (r *RingAdapter) UpdateStrTimeout(key string, timeout int64) error
- func (r *RingAdapter) UpdateTimeout(key string, timeout int64) error
- type SentinelAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterAdapter ¶
type ClusterAdapter struct {
// contains filtered or unexported fields
}
func NewClusterAdapter ¶
func NewClusterAdapter(addrs []string, username string, password string) *ClusterAdapter
func NewClusterAdapterByOptions ¶
func NewClusterAdapterByOptions(clusterOptions *redis.ClusterOptions) *ClusterAdapter
func (*ClusterAdapter) Delete ¶
func (r *ClusterAdapter) Delete(key string) error
func (*ClusterAdapter) DeleteBatchFilteredKey ¶
func (r *ClusterAdapter) DeleteBatchFilteredKey(filterKeyPrefix string) error
func (*ClusterAdapter) DeleteStr ¶
func (r *ClusterAdapter) DeleteStr(key string) error
func (*ClusterAdapter) Get ¶
func (r *ClusterAdapter) Get(key string, t ...reflect.Type) interface{}
func (*ClusterAdapter) GetClient ¶
func (r *ClusterAdapter) GetClient() *redis.ClusterClient
func (*ClusterAdapter) GetCountsFilteredKey ¶ added in v0.0.2
func (r *ClusterAdapter) GetCountsFilteredKey(filterKeyPrefix string) (int, error)
func (*ClusterAdapter) GetStr ¶
func (r *ClusterAdapter) GetStr(key string) string
func (*ClusterAdapter) GetStrTimeout ¶
func (r *ClusterAdapter) GetStrTimeout(key string) int64
func (*ClusterAdapter) GetTimeout ¶
func (r *ClusterAdapter) GetTimeout(key string) int64
func (*ClusterAdapter) Serialize ¶
func (r *ClusterAdapter) Serialize(session *model.Session) ([]byte, error)
func (*ClusterAdapter) Set ¶
func (r *ClusterAdapter) Set(key string, value interface{}, timeout int64) error
func (*ClusterAdapter) SetSerializer ¶
func (r *ClusterAdapter) SetSerializer(serializer persist.Serializer)
func (*ClusterAdapter) SetStr ¶
func (r *ClusterAdapter) SetStr(key string, value string, timeout int64) error
func (*ClusterAdapter) UnSerialize ¶
func (r *ClusterAdapter) UnSerialize(bytes []byte) (*model.Session, error)
func (*ClusterAdapter) Update ¶
func (r *ClusterAdapter) Update(key string, value interface{}) error
func (*ClusterAdapter) UpdateStr ¶
func (r *ClusterAdapter) UpdateStr(key string, value string) error
func (*ClusterAdapter) UpdateStrTimeout ¶
func (r *ClusterAdapter) UpdateStrTimeout(key string, timeout int64) error
func (*ClusterAdapter) UpdateTimeout ¶
func (r *ClusterAdapter) UpdateTimeout(key string, timeout int64) error
type RedisAdapter ¶
type RedisAdapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶
func NewAdapterByOptions ¶
func NewAdapterByOptions(options *redis.Options) (*RedisAdapter, error)
func (*RedisAdapter) Delete ¶
func (r *RedisAdapter) Delete(key string) error
func (*RedisAdapter) DeleteBatchFilteredKey ¶
func (r *RedisAdapter) DeleteBatchFilteredKey(filterKeyPrefix string) error
func (*RedisAdapter) DeleteStr ¶
func (r *RedisAdapter) DeleteStr(key string) error
func (*RedisAdapter) GetClient ¶
func (r *RedisAdapter) GetClient() *redis.Client
func (*RedisAdapter) GetStr ¶
func (r *RedisAdapter) GetStr(key string) string
func (*RedisAdapter) GetStrTimeout ¶
func (r *RedisAdapter) GetStrTimeout(key string) int64
func (*RedisAdapter) GetTimeout ¶
func (r *RedisAdapter) GetTimeout(key string) int64
func (*RedisAdapter) Set ¶
func (r *RedisAdapter) Set(key string, value interface{}, timeout int64) error
func (*RedisAdapter) SetSerializer ¶
func (r *RedisAdapter) SetSerializer(serializer persist.Serializer)
func (*RedisAdapter) SetStr ¶
func (r *RedisAdapter) SetStr(key string, value string, timeout int64) error
func (*RedisAdapter) Update ¶
func (r *RedisAdapter) Update(key string, value interface{}) error
func (*RedisAdapter) UpdateStrTimeout ¶
func (r *RedisAdapter) UpdateStrTimeout(key string, timeout int64) error
func (*RedisAdapter) UpdateTimeout ¶
func (r *RedisAdapter) UpdateTimeout(key string, timeout int64) error
type RingAdapter ¶
type RingAdapter struct {
// contains filtered or unexported fields
}
func NewRingAdapter ¶
func NewRingAdapter(addrs map[string]string) *RingAdapter
func NewRingAdapterByOptions ¶
func NewRingAdapterByOptions(options *redis.RingOptions) *RingAdapter
NewRingAdapterByOptions adapter for redis ring client
func (*RingAdapter) Delete ¶
func (r *RingAdapter) Delete(key string) error
func (*RingAdapter) DeleteBatchFilteredKey ¶
func (r *RingAdapter) DeleteBatchFilteredKey(filterKeyPrefix string) error
func (*RingAdapter) DeleteStr ¶
func (r *RingAdapter) DeleteStr(key string) error
func (*RingAdapter) GetClient ¶
func (r *RingAdapter) GetClient() *redis.Ring
func (*RingAdapter) GetCountsFilteredKey ¶ added in v0.0.2
func (r *RingAdapter) GetCountsFilteredKey(filterKeyPrefix string) (int, error)
func (*RingAdapter) GetStr ¶
func (r *RingAdapter) GetStr(key string) string
func (*RingAdapter) GetStrTimeout ¶
func (r *RingAdapter) GetStrTimeout(key string) int64
func (*RingAdapter) GetTimeout ¶
func (r *RingAdapter) GetTimeout(key string) int64
func (*RingAdapter) Set ¶
func (r *RingAdapter) Set(key string, value interface{}, timeout int64) error
func (*RingAdapter) SetSerializer ¶
func (r *RingAdapter) SetSerializer(serializer persist.Serializer)
func (*RingAdapter) SetStr ¶
func (r *RingAdapter) SetStr(key string, value string, timeout int64) error
func (*RingAdapter) Update ¶
func (r *RingAdapter) Update(key string, value interface{}) error
func (*RingAdapter) UpdateStrTimeout ¶
func (r *RingAdapter) UpdateStrTimeout(key string, timeout int64) error
func (*RingAdapter) UpdateTimeout ¶
func (r *RingAdapter) UpdateTimeout(key string, timeout int64) error
type SentinelAdapter ¶
type SentinelAdapter struct {
*RedisAdapter
}
func NewSentinelAdapter ¶
func NewSentinelAdapter(masterName string, addrs []string, username string, password string, db int) *SentinelAdapter
NewSentinelAdapter adapter for sentinel mode
func NewSentinelAdapterByOptions ¶
func NewSentinelAdapterByOptions(options *redis.FailoverOptions) *SentinelAdapter
func (*SentinelAdapter) GetCountsFilteredKey ¶ added in v0.0.2
func (r *SentinelAdapter) GetCountsFilteredKey(filterKeyPrefix string) (int, error)
Click to show internal directories.
Click to hide internal directories.