Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(context.Context, string) (bool, bool, error)
Set(context.Context, string, bool) error
}
Cache is an interface for caching ip addresses
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache is used to store/fetch ip proximity from an in-memory cache.
func NewMemoryCache ¶
func NewMemoryCache(memoryOptions *MemoryOptions) *MemoryCache
NewRedisCache provides a new in-memory cache client.
type MemoryOptions ¶
MemoryOptions holds in-memory cache configuration parameters.
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache is used to store/fetch ip proximity from redis.
func NewRedisCache ¶
func NewRedisCache(redisOpts *RedisOptions) *RedisCache
NewRedisCache provides a new redis cache client.
Click to show internal directories.
Click to hide internal directories.