cachestore

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCacheMiss is the error returned when the requested item is not available in cache
	ErrCacheMiss = errors.NotFound("not found in cache")
	// ErrCacheNotInitialized is the error returned when the cache handler is not initialized
	ErrCacheNotInitialized = errors.New("not initialized")
)

Functions

func NewService

func NewService(cfg *Config) (*redis.Pool, error)

NewService returns an instance of redis.Pool with all the required configurations set

Types

type Config

type Config struct {
	Host string
	Port string

	StoreName string
	Username  string
	Password  string

	PoolSize     int
	IdleTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	DialTimeout  time.Duration
}

Config holds all the configuration required for this package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL