Documentation ¶
Index ¶
- func GetDiskCacheBasePath(cfg *config.Wrapper, folder string) string
- type FileBlockCache
- func (d *FileBlockCache) AddCachedFileData(block protocol.BlockInfo, data []byte)
- func (d *FileBlockCache) GetCachedBlockData(blockHash []byte) ([]byte, bool)
- func (d *FileBlockCache) HasCachedBlockData(blockHash []byte) bool
- func (d *FileBlockCache) HasPinnedBlock(blockHash []byte) bool
- func (d *FileBlockCache) PinExistingBlock(block protocol.BlockInfo)
- func (d *FileBlockCache) PinNewBlock(block protocol.BlockInfo, data []byte)
- func (d *FileBlockCache) UnpinBlock(blockHash []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileBlockCache ¶
type FileBlockCache struct {
// contains filtered or unexported fields
}
func NewFileBlockCache ¶
func NewFileBlockCache(cfg *config.Wrapper, db *bolt.DB, fldrCfg config.FolderConfiguration) (*FileBlockCache, error)
func (*FileBlockCache) AddCachedFileData ¶
func (d *FileBlockCache) AddCachedFileData(block protocol.BlockInfo, data []byte)
func (*FileBlockCache) GetCachedBlockData ¶
func (d *FileBlockCache) GetCachedBlockData(blockHash []byte) ([]byte, bool)
func (*FileBlockCache) HasCachedBlockData ¶
func (d *FileBlockCache) HasCachedBlockData(blockHash []byte) bool
func (*FileBlockCache) HasPinnedBlock ¶
func (d *FileBlockCache) HasPinnedBlock(blockHash []byte) bool
func (*FileBlockCache) PinExistingBlock ¶
func (d *FileBlockCache) PinExistingBlock(block protocol.BlockInfo)
func (*FileBlockCache) PinNewBlock ¶
func (d *FileBlockCache) PinNewBlock(block protocol.BlockInfo, data []byte)
func (*FileBlockCache) UnpinBlock ¶
func (d *FileBlockCache) UnpinBlock(blockHash []byte)
Click to show internal directories.
Click to hide internal directories.