Documentation ¶
Index ¶
- func DirFS(root string) *osDirFS
- type Cache
- func (c *Cache) Add(key, val interface{}) (evicted bool)
- func (c *Cache) ContainsOrAdd(key, val interface{}) (existed, evicted bool)
- func (c *Cache) Get(key interface{}) (value interface{}, exists bool)
- func (c *Cache) GetOldest() (key, value interface{}, exists bool)
- func (c *Cache) PeekOrAdd(key, val interface{}) (prev interface{}, existed, evicted bool)
- func (c *Cache) Purge()
- func (c *Cache) Remove(key interface{}) (present bool)
- func (c *Cache) RemoveAll() (key, val interface{}, removed bool)
- type CacheFS
- type FileCache
- func (c *FileCache) Contains(id string) (exists bool)
- func (c *FileCache) Get(id string) (item Item, exists bool)
- func (c *FileCache) Init() (err error)
- func (c *FileCache) Open(id string) (file io.ReadSeekCloser, item Item, err error)
- func (c *FileCache) OpenOrCreate(id string, create func(w io.Writer) error) (res io.ReadSeekCloser, item Item, err error)
- func (c *FileCache) Remove(id string) error
- type Item
- type MutexMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct { Cache *lru.Cache Debounce time.Duration // contains filtered or unexported fields }
func (*Cache) ContainsOrAdd ¶ added in v0.4.1
type FileCache ¶ added in v0.4.1
type FileCache struct { Compressed bool // contains filtered or unexported fields }
func NewFileCache ¶ added in v0.4.1
func (*FileCache) OpenOrCreate ¶ added in v0.4.1
Click to show internal directories.
Click to hide internal directories.