Documentation ¶
Index ¶
- type Cache
- type MockCache
- func (mc *MockCache) CandidateExists(owner, candidate string) bool
- func (mc *MockCache) Delete(key, value string) error
- func (mc *MockCache) Read(key string, value interface{}) error
- func (mc *MockCache) ReadCandidates(owner string) []string
- func (mc *MockCache) ReadOwners() ([]string, error)
- func (mc *MockCache) TimerExists(key string) bool
- func (mc *MockCache) Write(key, value string) error
- func (mc *MockCache) WriteTimer(key, value string, ttl time.Time) error
- type RedisCache
- func (rc *RedisCache) CandidateExists(owner, candidate string) bool
- func (rc *RedisCache) Delete(key, value string) error
- func (rc *RedisCache) Read(key string, value interface{}) error
- func (rc *RedisCache) ReadCandidates(owner string) []string
- func (rc *RedisCache) ReadOwners() ([]string, error)
- func (rc *RedisCache) TimerExists(key string) bool
- func (rc *RedisCache) Write(key, value string) error
- func (rc *RedisCache) WriteTimer(key, value string, ttl time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Write(key, value string) error Read(key string, value interface{}) error ReadOwners() ([]string, error) ReadCandidates(owner string) []string CandidateExists(owner, candidate string) bool WriteTimer(key, value string, ttl time.Time) error TimerExists(key string) bool Delete(key, value string) error }
type MockCache ¶
type MockCache struct{}
func NewMockCache ¶
func NewMockCache() *MockCache
func (*MockCache) CandidateExists ¶
func (*MockCache) ReadCandidates ¶
func (*MockCache) ReadOwners ¶
func (*MockCache) TimerExists ¶
type RedisCache ¶
func NewRedisCache ¶
func (*RedisCache) CandidateExists ¶
func (rc *RedisCache) CandidateExists(owner, candidate string) bool
func (*RedisCache) Delete ¶
func (rc *RedisCache) Delete(key, value string) error
func (*RedisCache) Read ¶
func (rc *RedisCache) Read(key string, value interface{}) error
func (*RedisCache) ReadCandidates ¶
func (rc *RedisCache) ReadCandidates(owner string) []string
func (*RedisCache) ReadOwners ¶
func (rc *RedisCache) ReadOwners() ([]string, error)
func (*RedisCache) TimerExists ¶
func (rc *RedisCache) TimerExists(key string) bool
func (*RedisCache) Write ¶
func (rc *RedisCache) Write(key, value string) error
func (*RedisCache) WriteTimer ¶
func (rc *RedisCache) WriteTimer(key, value string, ttl time.Time) error
Click to show internal directories.
Click to hide internal directories.