Documentation
¶
Index ¶
- func FileMd5Get(dbFilePath string, cb func(getter FileMd5Getter))
- func FileMd5TryFreeMemory()
- func FileTtlCache(key string, f func() (b []byte, ttl time.Duration, err error)) (b []byte, err error)
- func MustKvdbGet(s string, obj interface{}) bool
- func MustKvdbGetBytes(s string) (b []byte)
- func MustKvdbSet(s string, obj interface{})
- func MustKvdbSetBytes(s string, b []byte)
- func MustMd5FileChangeCache(key string, pathList []string, f func()) (hasChange bool)
- func MustMd5FileChangeCacheClean()
- func MustMd5FileChangeCacheV2(key string, pathListF func() (pathListF []string, hasChange bool), f func()) (hasChange bool)
- func MustMd5FileChangeCacheV3(req MustMd5FileChangeCacheV3Request) (hasChange bool)
- func SetMd5FileWithBuf(cb func(path string, innerBuf []byte) ([16]byte, error))
- type AsyncTtlCache
- type FileMd5GetByFullPath
- type FileMd5Getter
- type FileMd5GetterWithLock
- type MemoryTtlCacheV2
- type MustMd5FileChangeCacheV3Request
- type NewFileMd5GetterRequest
- type TtlCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileMd5Get ¶
func FileMd5Get(dbFilePath string, cb func(getter FileMd5Getter))
func FileMd5TryFreeMemory ¶
func FileMd5TryFreeMemory()
func FileTtlCache ¶
func MustKvdbGet ¶
func MustKvdbGetBytes ¶
func MustKvdbSet ¶
func MustKvdbSet(s string, obj interface{})
func MustKvdbSetBytes ¶
func MustMd5FileChangeCache ¶
func MustMd5FileChangeCacheClean ¶
func MustMd5FileChangeCacheClean()
func MustMd5FileChangeCacheV3 ¶
func MustMd5FileChangeCacheV3(req MustMd5FileChangeCacheV3Request) (hasChange bool)
Types ¶
type AsyncTtlCache ¶
type AsyncTtlCache struct {
// contains filtered or unexported fields
}
func NewAsyncCache ¶
func NewAsyncCache() *AsyncTtlCache
func (*AsyncTtlCache) DoWithTtl ¶
func (s *AsyncTtlCache) DoWithTtl(key string, f func() (value interface{}, ttl uint32, canSave bool)) (value interface{}, ttl uint32)
func (*AsyncTtlCache) GcThread ¶
func (s *AsyncTtlCache) GcThread()
func (*AsyncTtlCache) Len ¶
func (s *AsyncTtlCache) Len() int
type FileMd5GetByFullPath ¶
type FileMd5Getter ¶
type FileMd5Getter struct {
// contains filtered or unexported fields
}
func (FileMd5Getter) Close ¶
func (getter FileMd5Getter) Close()
func (FileMd5Getter) GetMd5ByFullPath__NOLOCK ¶
func (getter FileMd5Getter) GetMd5ByFullPath__NOLOCK(path string) string
func (FileMd5Getter) GetMd5ByStatAndFullPath__NOLOCK ¶
func (getter FileMd5Getter) GetMd5ByStatAndFullPath__NOLOCK(statAndFullPath udwFile.StatAndFullPath) string
type FileMd5GetterWithLock ¶
type FileMd5GetterWithLock struct {
// contains filtered or unexported fields
}
func NewFileMd5GetterWithLock ¶
func NewFileMd5GetterWithLock(dbFilePath string) FileMd5GetterWithLock
func (FileMd5GetterWithLock) Close ¶
func (getter FileMd5GetterWithLock) Close()
func (FileMd5GetterWithLock) GetMd5ByFullPath ¶
func (getter FileMd5GetterWithLock) GetMd5ByFullPath(path string) string
func (FileMd5GetterWithLock) GetMd5ByStatAndFullPath ¶
func (getter FileMd5GetterWithLock) GetMd5ByStatAndFullPath(statAndFullPath udwFile.StatAndFullPath) string
type MemoryTtlCacheV2 ¶
type MemoryTtlCacheV2 struct {
// contains filtered or unexported fields
}
func NewMemoryTtlCacheV2 ¶
func NewMemoryTtlCacheV2() *MemoryTtlCacheV2
func (*MemoryTtlCacheV2) GcThread ¶
func (s *MemoryTtlCacheV2) GcThread()
func (*MemoryTtlCacheV2) Remove ¶
func (s *MemoryTtlCacheV2) Remove(key string)
type NewFileMd5GetterRequest ¶
Click to show internal directories.
Click to hide internal directories.