Documentation
¶
Index ¶
- Variables
- func BloomCacheKeyCheck(key string) bool
- func BloomFilterAdd(key string)
- func InitBoomFilter(n uint, fp float64)
- func IsErrKeyNotFound(err error) bool
- func Marshal(data interface{}) ([]byte, error)
- func SetTranscoderFunc(marshaller Marshaller, unMarshaller UnMarshaller)
- func UnMarshal(data []byte, receiver interface{}) error
- type AbstractCache
- type Marshaller
- type RememberCallback
- type UnMarshaller
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found or expired")
Functions ¶
func BloomCacheKeyCheck ¶ added in v0.0.6
func BloomFilterAdd ¶ added in v0.0.6
func BloomFilterAdd(key string)
func InitBoomFilter ¶ added in v0.0.6
InitBoomFilter 初始化布隆过滤器
func IsErrKeyNotFound ¶ added in v0.0.6
func SetTranscoderFunc ¶ added in v0.0.6
func SetTranscoderFunc(marshaller Marshaller, unMarshaller UnMarshaller)
Types ¶
type AbstractCache ¶
type AbstractCache interface {
Get(string) ([]byte, error)
GetWithUnmarshal(string, interface{}) error
Set(string, []byte, ...int) error
SetWithMarshal(string, interface{}, ...int) error
Delete(string) error
Exists(string) bool
Remember(string, interface{}, RememberCallback, ...int) error
GetProvider() interface{}
}
type Marshaller ¶ added in v0.0.6
type RememberCallback ¶ added in v0.0.6
type RememberCallback func() (interface{}, error)
type UnMarshaller ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.