Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRedis is returned whenever there is an issue with the storage. // This can be for example an exhausted pool issues or a connection // failure. // Redis issues represents internal errors. ErrRedis = errors.Wrap(surf.ErrInternal, "redis") // ErrMiss is an alias. ErrMiss = errors.Wrap(surf.ErrMiss, "redis") // ErrConflict is an alias. ErrConflict = errors.Wrap(surf.ErrConflict, "redis") )
Functions ¶
func EnsureRedis ¶
EnsureRedis creates a redis pool. Only if a pool with a successful connection can be created then the test is continued. If a connection is not successful test is skipped. Redis connection can be set via REDIS_URL environment variable. It is the clients responsibility to close the pool when no longer needed.
func NewRedisCache ¶
func NewRedisCache(pool *redis.Pool) surf.CacheService
NewRedisCache returns a CacheService implementation that is using given redis pool as a storage backend.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.