Documentation ¶
Index ¶
Constants ¶
View Source
const ( ENOTFOUND = "not found" EINTERNAL = "server error" EMALFORMED = "schema invalid" )
Variables ¶
This section is empty.
Functions ¶
func NewHealthResponse ¶
func NewitemsResponse ¶
NewitemsResponse creates itemsResponse object
Types ¶
type CacheStore ¶
type CacheStore struct {
// contains filtered or unexported fields
}
func NewCacheStore ¶
func NewCacheStore(c *ttlcache.Cache) *CacheStore
NewCacheStore constructor: returns instance of CacheStore
func (*CacheStore) Count ¶
func (c *CacheStore) Count() int
Count returns the number of items in the cache
func (*CacheStore) Get ¶
func (c *CacheStore) Get(key string) (interface{}, bool)
Get retrieves key from cache store
func (*CacheStore) Set ¶
func (c *CacheStore) Set(key string, data interface{}) error
Set adds key and data into cache store
func (*CacheStore) SetCacheSizeLimit ¶
func (c *CacheStore) SetCacheSizeLimit(limit int)
SetCacheSizeLimit sets the max number of items stored in cache
func (*CacheStore) SetTTL ¶
func (c *CacheStore) SetTTL(ttl time.Duration)
SetTTL sets global TTL expiration of keys inside cache store
type Error ¶
type ItemStore ¶
type ItemStore struct {
// contains filtered or unexported fields
}
func NewItemStore ¶
Click to show internal directories.
Click to hide internal directories.