Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResultWrapper ¶
func NewResultWrapper(result interface{}, err error) *resultWrapper
Types ¶
type Action ¶
type Action func() ActionResult
type ActionResult ¶
type ActionResult interface { Result() interface{} Err() error }
type BlockCache ¶
type BlockCache struct {
// contains filtered or unexported fields
}
func NewBlockCache ¶
func NewBlockCache(blockSize uint32, lruSize uint32, hashFuncs ...HashFunc) *BlockCache
NewBlockCache blockSize 为0表示不使用block,退化为单纯的lru,同一请求有可能执行多次,并覆盖lru缓存
func (*BlockCache) WithCacheDo ¶
func (b *BlockCache) WithCacheDo(key string, f Action) ActionResult
Click to show internal directories.
Click to hide internal directories.