Documentation ¶
Overview ¶
Package rediscluster is a generated GoMock package.
Index ¶
- Constants
- type MockRedisClusterClientInterface
- func (m *MockRedisClusterClientInterface) Del(ctx context.Context, keys ...string) *v9.IntCmd
- func (m *MockRedisClusterClientInterface) EXPECT() *MockRedisClusterClientInterfaceMockRecorder
- func (m *MockRedisClusterClientInterface) Expire(ctx context.Context, key string, expiration time.Duration) *v9.BoolCmd
- func (m *MockRedisClusterClientInterface) FlushAll(ctx context.Context) *v9.StatusCmd
- func (m *MockRedisClusterClientInterface) Get(ctx context.Context, key string) *v9.StringCmd
- func (m *MockRedisClusterClientInterface) SAdd(ctx context.Context, key string, members ...any) *v9.IntCmd
- func (m *MockRedisClusterClientInterface) SMembers(ctx context.Context, key string) *v9.StringSliceCmd
- func (m *MockRedisClusterClientInterface) Set(ctx context.Context, key string, values any, expiration time.Duration) *v9.StatusCmd
- func (m *MockRedisClusterClientInterface) TTL(ctx context.Context, key string) *v9.DurationCmd
- type MockRedisClusterClientInterfaceMockRecorder
- func (mr *MockRedisClusterClientInterfaceMockRecorder) Del(ctx interface{}, keys ...interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) Expire(ctx, key, expiration interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) FlushAll(ctx interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) Get(ctx, key interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) SAdd(ctx, key interface{}, members ...interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) SMembers(ctx, key interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) Set(ctx, key, values, expiration interface{}) *gomock.Call
- func (mr *MockRedisClusterClientInterfaceMockRecorder) TTL(ctx, key interface{}) *gomock.Call
- type RedisClusterClientInterface
- type RedisClusterStore
- func (s *RedisClusterStore) Clear(ctx context.Context) error
- func (s *RedisClusterStore) Delete(ctx context.Context, key any) error
- func (s *RedisClusterStore) Get(ctx context.Context, key any) (any, error)
- func (s *RedisClusterStore) GetType() string
- func (s *RedisClusterStore) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (s *RedisClusterStore) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
- func (s *RedisClusterStore) Set(ctx context.Context, key any, value any, options ...lib_store.Option) error
Constants ¶
const ( // RedisType represents the storage type as a string value RedisClusterType = "rediscluster" // RedisTagPattern represents the tag pattern to be used as a key in specified storage RedisClusterTagPattern = "gocache_tag_%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRedisClusterClientInterface ¶
type MockRedisClusterClientInterface struct {
// contains filtered or unexported fields
}
MockRedisClusterClientInterface is a mock of RedisClusterClientInterface interface.
func NewMockRedisClusterClientInterface ¶
func NewMockRedisClusterClientInterface(ctrl *gomock.Controller) *MockRedisClusterClientInterface
NewMockRedisClusterClientInterface creates a new mock instance.
func (*MockRedisClusterClientInterface) EXPECT ¶
func (m *MockRedisClusterClientInterface) EXPECT() *MockRedisClusterClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRedisClusterClientInterface) Expire ¶
func (m *MockRedisClusterClientInterface) Expire(ctx context.Context, key string, expiration time.Duration) *v9.BoolCmd
Expire mocks base method.
func (*MockRedisClusterClientInterface) FlushAll ¶
func (m *MockRedisClusterClientInterface) FlushAll(ctx context.Context) *v9.StatusCmd
FlushAll mocks base method.
func (*MockRedisClusterClientInterface) SAdd ¶
func (m *MockRedisClusterClientInterface) SAdd(ctx context.Context, key string, members ...any) *v9.IntCmd
SAdd mocks base method.
func (*MockRedisClusterClientInterface) SMembers ¶
func (m *MockRedisClusterClientInterface) SMembers(ctx context.Context, key string) *v9.StringSliceCmd
SMembers mocks base method.
func (*MockRedisClusterClientInterface) Set ¶
func (m *MockRedisClusterClientInterface) Set(ctx context.Context, key string, values any, expiration time.Duration) *v9.StatusCmd
Set mocks base method.
func (*MockRedisClusterClientInterface) TTL ¶
func (m *MockRedisClusterClientInterface) TTL(ctx context.Context, key string) *v9.DurationCmd
TTL mocks base method.
type MockRedisClusterClientInterfaceMockRecorder ¶
type MockRedisClusterClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockRedisClusterClientInterfaceMockRecorder is the mock recorder for MockRedisClusterClientInterface.
func (*MockRedisClusterClientInterfaceMockRecorder) Del ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) Del(ctx interface{}, keys ...interface{}) *gomock.Call
Del indicates an expected call of Del.
func (*MockRedisClusterClientInterfaceMockRecorder) Expire ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) Expire(ctx, key, expiration interface{}) *gomock.Call
Expire indicates an expected call of Expire.
func (*MockRedisClusterClientInterfaceMockRecorder) FlushAll ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) FlushAll(ctx interface{}) *gomock.Call
FlushAll indicates an expected call of FlushAll.
func (*MockRedisClusterClientInterfaceMockRecorder) Get ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) Get(ctx, key interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockRedisClusterClientInterfaceMockRecorder) SAdd ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) SAdd(ctx, key interface{}, members ...interface{}) *gomock.Call
SAdd indicates an expected call of SAdd.
func (*MockRedisClusterClientInterfaceMockRecorder) SMembers ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) SMembers(ctx, key interface{}) *gomock.Call
SMembers indicates an expected call of SMembers.
func (*MockRedisClusterClientInterfaceMockRecorder) Set ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) Set(ctx, key, values, expiration interface{}) *gomock.Call
Set indicates an expected call of Set.
func (*MockRedisClusterClientInterfaceMockRecorder) TTL ¶
func (mr *MockRedisClusterClientInterfaceMockRecorder) TTL(ctx, key interface{}) *gomock.Call
TTL indicates an expected call of TTL.
type RedisClusterClientInterface ¶
type RedisClusterClientInterface interface { Get(ctx context.Context, key string) *redis.StringCmd TTL(ctx context.Context, key string) *redis.DurationCmd Expire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd Set(ctx context.Context, key string, values any, expiration time.Duration) *redis.StatusCmd Del(ctx context.Context, keys ...string) *redis.IntCmd FlushAll(ctx context.Context) *redis.StatusCmd SAdd(ctx context.Context, key string, members ...any) *redis.IntCmd SMembers(ctx context.Context, key string) *redis.StringSliceCmd }
RedisClusterClientInterface represents a go-redis/redis clusclient
type RedisClusterStore ¶
type RedisClusterStore struct {
// contains filtered or unexported fields
}
RedisStore is a store for Redis
func NewRedisCluster ¶
func NewRedisCluster(client RedisClusterClientInterface, options ...lib_store.Option) *RedisClusterStore
NewRedis creates a new store to Redis instance(s)
func (*RedisClusterStore) Clear ¶
func (s *RedisClusterStore) Clear(ctx context.Context) error
Clear resets all data in the store
func (*RedisClusterStore) Delete ¶
func (s *RedisClusterStore) Delete(ctx context.Context, key any) error
Delete removes data from Redis for given key identifier
func (*RedisClusterStore) GetType ¶
func (s *RedisClusterStore) GetType() string
GetType returns the store type
func (*RedisClusterStore) GetWithTTL ¶
GetWithTTL returns data stored from a given key and its corresponding TTL
func (*RedisClusterStore) Invalidate ¶
func (s *RedisClusterStore) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
Invalidate invalidates some cache data in Redis for given options