Documentation ¶
Index ¶
- func NewCacheService(store Store) (*cacheService, error)
- type Service
- type Store
- type TagSet
- type TaggedCacheService
- func (tc *TaggedCacheService) Decrement(key string, value uint64) (uint64, error)
- func (tc *TaggedCacheService) Get(keys ...string) ([]byte, error)
- func (tc *TaggedCacheService) Increment(key string, value uint64) (uint64, error)
- func (tc *TaggedCacheService) Tags(keys ...string) (*TaggedCacheService, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCacheService ¶
New instance of simply cache
Types ¶
type Service ¶
type Service interface { Get(keys ...string) ([]byte, error) Increment(key string, value uint64) (uint64, error) Decrement(key string, value uint64) (uint64, error) Tags(keys ...string) (*TaggedCacheService, error) }
Service is interface to cache service
type Store ¶
type Store interface { Get(key string) ([]byte, error) Increment(key string, value uint64) (uint64, error) Decrement(key string, value uint64) (uint64, error) Forever(key string, value []byte) (bool, error) GetPrefix() string }
Store is interface to cache store
type TagSet ¶
type TagSet struct {
// contains filtered or unexported fields
}
store is a collection of method to access to store
type TaggedCacheService ¶
type TaggedCacheService struct { TagSet *TagSet Store Store // contains filtered or unexported fields }
TaggedCacheService ...
func NewTaggedCacheService ¶
func NewTaggedCacheService(store Store, names ...string) (*TaggedCacheService, error)
NewTaggedCacheService instance of tagged cache
func (*TaggedCacheService) Decrement ¶
func (tc *TaggedCacheService) Decrement(key string, value uint64) (uint64, error)
func (*TaggedCacheService) Increment ¶
func (tc *TaggedCacheService) Increment(key string, value uint64) (uint64, error)
func (*TaggedCacheService) Tags ¶
func (tc *TaggedCacheService) Tags(keys ...string) (*TaggedCacheService, error)
Click to show internal directories.
Click to hide internal directories.