Documentation ¶
Index ¶
- Variables
- type Cache
- func (me *Cache) AsFileStore() missinggo.FileStore
- func (me *Cache) Info() (ret CacheInfo)
- func (me *Cache) OpenFile(path string, flag int) (ret *File, err error)
- func (me *Cache) Remove(path string) (err error)
- func (me *Cache) Rename(from, to string) (err error)
- func (me *Cache) SetCapacity(capacity int64)
- func (me *Cache) Stat(path string) (os.FileInfo, error)
- func (me *Cache) StatFile(path string) (os.FileInfo, error)
- func (me *Cache) TrimToCapacity()
- func (me *Cache) WalkItems(cb func(ItemInfo))
- type CacheInfo
- type File
- func (me *File) Close() error
- func (me *File) Read(b []byte) (n int, err error)
- func (me *File) ReadAt(b []byte, off int64) (n int, err error)
- func (me *File) Remove() (err error)
- func (me *File) Seek(offset int64, whence int) (ret int64, err error)
- func (me *File) Stat() (os.FileInfo, error)
- func (me *File) Write(b []byte) (n int, err error)
- func (me *File) WriteAt(b []byte, off int64) (n int, err error)
- type ItemInfo
- type Iterator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadPath = errors.New("bad path") ErrIsDir = errors.New("is directory") )
View Source
var ( ErrFileTooLarge = errors.New("file too large for cache") ErrFileDisappeared = errors.New("file disappeared") )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) AsFileStore ¶
func (*Cache) SetCapacity ¶
Setting a negative capacity means unlimited.
func (*Cache) TrimToCapacity ¶
func (me *Cache) TrimToCapacity()
Click to show internal directories.
Click to hide internal directories.