Documentation
¶
Index ¶
- Constants
- Variables
- type Batch
- type Cache
- type CheckCache
- func (c *CheckCache) Close() error
- func (c *CheckCache) GetChunkStatus(mac objects.MAC) ([]byte, error)
- func (c *CheckCache) GetObjectStatus(mac objects.MAC) ([]byte, error)
- func (c *CheckCache) GetPackfileStatus(mac objects.MAC) ([]byte, error)
- func (c *CheckCache) GetVFSEntryStatus(mac objects.MAC) ([]byte, error)
- func (c *CheckCache) GetVFSStatus(mac objects.MAC) ([]byte, error)
- func (c *CheckCache) PutChunkStatus(mac objects.MAC, err []byte) error
- func (c *CheckCache) PutObjectStatus(mac objects.MAC, err []byte) error
- func (c *CheckCache) PutPackfileStatus(mac objects.MAC, err []byte) error
- func (c *CheckCache) PutVFSEntryStatus(mac objects.MAC, err []byte) error
- func (c *CheckCache) PutVFSStatus(mac objects.MAC, err []byte) error
- type Constructor
- type DBStore
- type MaintenanceCache
- func (c *MaintenanceCache) Close() error
- func (c *MaintenanceCache) DeleletePackfiles(snapshotID objects.MAC) error
- func (c *MaintenanceCache) DeleteSnapshot(snapshotID objects.MAC) error
- func (c *MaintenanceCache) GetPackfiles(snapshotID objects.MAC) iter.Seq[objects.MAC]
- func (c *MaintenanceCache) HasPackfile(packfileMAC objects.MAC) bool
- func (c *MaintenanceCache) HasSnapshot(snapshotID objects.MAC) (bool, error)
- func (c *MaintenanceCache) PutPackfile(snapshotID, packfileMAC objects.MAC) error
- func (c *MaintenanceCache) PutSnapshot(snapshotID objects.MAC, data []byte) error
- type Manager
- func (m *Manager) Check() (*CheckCache, error)
- func (m *Manager) Close() error
- func (m *Manager) Maintenance(repositoryID uuid.UUID) (*MaintenanceCache, error)
- func (m *Manager) Packing() (*PackingCache, error)
- func (m *Manager) Repository(repositoryID uuid.UUID) (*_RepositoryCache, error)
- func (m *Manager) Scan(snapshotID objects.MAC) (*ScanCache, error)
- func (m *Manager) VFS(repositoryID uuid.UUID, scheme string, origin string, deleteOnClose bool) (*VFSCache, error)
- type Option
- type PackingCache
- func (c *PackingCache) Close() error
- func (c *PackingCache) GetIndexesBlob() iter.Seq[[]byte]
- func (c *PackingCache) HasBlob(Type resources.Type, mac objects.MAC) (bool, error)
- func (c *PackingCache) PutBlob(Type resources.Type, mac objects.MAC) error
- func (c *PackingCache) PutIndexBlob(Type resources.Type, mac objects.MAC, data []byte) error
- type SQLiteDBStore
- type ScanBatch
- type ScanCache
- func (c *ScanCache) Close() error
- func (c *ScanCache) DelDeleted(blobType resources.Type, blobCsum objects.MAC) error
- func (c *ScanCache) DelDelta(blobType resources.Type, blobCsum, packfileMAC objects.MAC) error
- func (c *ScanCache) DelPackfile(packfile objects.MAC) error
- func (c *ScanCache) DelState(stateID objects.MAC) error
- func (c *ScanCache) EnumerateKeysWithPrefix(prefix string, reverse bool) iter.Seq2[string, []byte]
- func (c *ScanCache) GetConfiguration(key string) ([]byte, error)
- func (c *ScanCache) GetConfigurations() iter.Seq[[]byte]
- func (c *ScanCache) GetDeleteds() iter.Seq2[objects.MAC, []byte]
- func (c *ScanCache) GetDeletedsByType(blobType resources.Type) iter.Seq2[objects.MAC, []byte]
- func (c *ScanCache) GetDelta(blobType resources.Type, blobCsum objects.MAC) iter.Seq2[objects.MAC, []byte]
- func (c *ScanCache) GetDeltas() iter.Seq2[objects.MAC, []byte]
- func (c *ScanCache) GetDeltasByType(blobType resources.Type) iter.Seq2[objects.MAC, []byte]
- func (c *ScanCache) GetDirectory(source int, directory string) ([]byte, error)
- func (c *ScanCache) GetFile(source int, file string) ([]byte, error)
- func (c *ScanCache) GetPackfiles() iter.Seq2[objects.MAC, []byte]
- func (c *ScanCache) GetState(stateID objects.MAC) ([]byte, error)
- func (c *ScanCache) GetStates() (map[objects.MAC][]byte, error)
- func (c *ScanCache) HasDeleted(blobType resources.Type, blobCsum objects.MAC) (bool, error)
- func (c *ScanCache) HasPackfile(packfile objects.MAC) (bool, error)
- func (c *ScanCache) HasState(stateID objects.MAC) (bool, error)
- func (c *ScanCache) NewBatch() StateBatch
- func (c *ScanCache) NewScanBatch() *ScanBatch
- func (c *ScanCache) PutConfiguration(key string, data []byte) error
- func (c *ScanCache) PutDeleted(blobType resources.Type, blobCsum objects.MAC, data []byte) error
- func (c *ScanCache) PutDelta(blobType resources.Type, blobCsum, packfile objects.MAC, data []byte) error
- func (c *ScanCache) PutDirectory(source int, directory string, data []byte) error
- func (c *ScanCache) PutFile(source int, file string, data []byte) error
- func (c *ScanCache) PutPackfile(packfile objects.MAC, data []byte) error
- func (c *ScanCache) PutState(stateID objects.MAC, data []byte) error
- type StateBatch
- type StateCache
- type VFSCache
Constants ¶
View Source
const CACHE_VERSION = "2.0.0"
Variables ¶
View Source
var (
ErrClosed = fmt.Errorf("cache closed")
)
Functions ¶
This section is empty.
Types ¶
type Batch ¶ added in v1.0.10
This is not goroutine safe, external synchronization must be provided.
type Cache ¶ added in v1.0.10
type Cache interface {
Put([]byte, []byte) error
Has([]byte) (bool, error)
Get([]byte) ([]byte, error)
// Must support Delete during Scan
Delete([]byte) error
// reverse is only to accomodate EnumerateKeysWithPrefix, once
// that doesn't need it anymore this can become simpler again.
// key returned by an iteration might get invalidated on
// subsequent iterations.
Scan([]byte, bool) iter.Seq2[[]byte, []byte]
NewBatch() Batch
Close() error
}
type CheckCache ¶
type CheckCache struct {
// contains filtered or unexported fields
}
func (*CheckCache) GetChunkStatus ¶
func (c *CheckCache) GetChunkStatus(mac objects.MAC) ([]byte, error)
func (*CheckCache) GetObjectStatus ¶
func (c *CheckCache) GetObjectStatus(mac objects.MAC) ([]byte, error)
func (*CheckCache) GetPackfileStatus ¶
func (c *CheckCache) GetPackfileStatus(mac objects.MAC) ([]byte, error)
func (*CheckCache) GetVFSEntryStatus ¶
func (c *CheckCache) GetVFSEntryStatus(mac objects.MAC) ([]byte, error)
func (*CheckCache) GetVFSStatus ¶
func (c *CheckCache) GetVFSStatus(mac objects.MAC) ([]byte, error)
func (*CheckCache) PutChunkStatus ¶
func (c *CheckCache) PutChunkStatus(mac objects.MAC, err []byte) error
func (*CheckCache) PutObjectStatus ¶
func (c *CheckCache) PutObjectStatus(mac objects.MAC, err []byte) error
func (*CheckCache) PutPackfileStatus ¶
func (c *CheckCache) PutPackfileStatus(mac objects.MAC, err []byte) error
func (*CheckCache) PutVFSEntryStatus ¶
func (c *CheckCache) PutVFSEntryStatus(mac objects.MAC, err []byte) error
func (*CheckCache) PutVFSStatus ¶
func (c *CheckCache) PutVFSStatus(mac objects.MAC, err []byte) error
type Constructor ¶ added in v1.0.10
type DBStore ¶
type DBStore[K any, V any] struct { Prefix string Cache *ScanCache // contains filtered or unexported fields }
DBStore implements btree.Storer
type MaintenanceCache ¶
type MaintenanceCache struct {
// contains filtered or unexported fields
}
func (*MaintenanceCache) DeleletePackfiles ¶
func (c *MaintenanceCache) DeleletePackfiles(snapshotID objects.MAC) error
func (*MaintenanceCache) DeleteSnapshot ¶
func (c *MaintenanceCache) DeleteSnapshot(snapshotID objects.MAC) error
func (*MaintenanceCache) GetPackfiles ¶
func (*MaintenanceCache) HasPackfile ¶
func (c *MaintenanceCache) HasPackfile(packfileMAC objects.MAC) bool
func (*MaintenanceCache) HasSnapshot ¶
func (c *MaintenanceCache) HasSnapshot(snapshotID objects.MAC) (bool, error)
func (*MaintenanceCache) PutPackfile ¶
func (c *MaintenanceCache) PutPackfile(snapshotID, packfileMAC objects.MAC) error
func (*MaintenanceCache) PutSnapshot ¶
func (c *MaintenanceCache) PutSnapshot(snapshotID objects.MAC, data []byte) error
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(cons Constructor) *Manager
func (*Manager) Check ¶
func (m *Manager) Check() (*CheckCache, error)
XXX - beware that caller has responsibility to call Close() on the returned cache
func (*Manager) Maintenance ¶
func (m *Manager) Maintenance(repositoryID uuid.UUID) (*MaintenanceCache, error)
func (*Manager) Packing ¶
func (m *Manager) Packing() (*PackingCache, error)
XXX - beware that caller has responsibility to call Close() on the returned cache
func (*Manager) Repository ¶
type PackingCache ¶
type PackingCache struct {
// contains filtered or unexported fields
}
func (*PackingCache) GetIndexesBlob ¶
func (c *PackingCache) GetIndexesBlob() iter.Seq[[]byte]
func (*PackingCache) PutIndexBlob ¶
type SQLiteDBStore ¶ added in v1.0.13
SQLiteDBStore implements btree.Storer
func NewSQLiteDBStore ¶ added in v1.0.13
func NewSQLiteDBStore[K, V any](storePath, storeName string) (*SQLiteDBStore[K, V], error)
func (*SQLiteDBStore[K, V]) Close ¶ added in v1.0.13
func (ds *SQLiteDBStore[K, V]) Close() error
type ScanBatch ¶ added in v1.0.10
type ScanBatch struct {
Batch
}
func (*ScanBatch) PutDirectory ¶ added in v1.0.10
type ScanCache ¶
type ScanCache struct {
// contains filtered or unexported fields
}
func (*ScanCache) DelDeleted ¶
func (*ScanCache) EnumerateKeysWithPrefix ¶
func (*ScanCache) GetConfiguration ¶
func (*ScanCache) GetDeletedsByType ¶
func (*ScanCache) GetDeltasByType ¶
func (*ScanCache) GetDirectory ¶
func (*ScanCache) HasDeleted ¶
func (*ScanCache) NewBatch ¶ added in v1.0.10
func (c *ScanCache) NewBatch() StateBatch
func (*ScanCache) NewScanBatch ¶ added in v1.0.10
func (*ScanCache) PutConfiguration ¶
func (*ScanCache) PutDeleted ¶
func (*ScanCache) PutDirectory ¶
func (*ScanCache) PutPackfile ¶
type StateBatch ¶ added in v1.0.10
type StateCache ¶
type StateCache interface {
PutState(stateID objects.MAC, data []byte) error
HasState(stateID objects.MAC) (bool, error)
GetState(stateID objects.MAC) ([]byte, error)
DelState(stateID objects.MAC) error
GetStates() (map[objects.MAC][]byte, error)
PutDelta(blobType resources.Type, blobCsum, packfile objects.MAC, data []byte) error
GetDelta(blobType resources.Type, blobCsum objects.MAC) iter.Seq2[objects.MAC, []byte]
GetDeltasByType(blobType resources.Type) iter.Seq2[objects.MAC, []byte]
GetDeltas() iter.Seq2[objects.MAC, []byte]
DelDelta(blobType resources.Type, blobCsum objects.MAC, packfileMAC objects.MAC) error
PutDeleted(blobType resources.Type, blobCsum objects.MAC, data []byte) error
HasDeleted(blobType resources.Type, blobCsum objects.MAC) (bool, error)
DelDeleted(blobType resources.Type, blobCsum objects.MAC) error
GetDeletedsByType(blobType resources.Type) iter.Seq2[objects.MAC, []byte]
GetDeleteds() iter.Seq2[objects.MAC, []byte]
PutPackfile(packfile objects.MAC, data []byte) error
DelPackfile(packfile objects.MAC) error
HasPackfile(packfile objects.MAC) (bool, error)
GetPackfiles() iter.Seq2[objects.MAC, []byte]
PutConfiguration(key string, data []byte) error
GetConfiguration(key string) ([]byte, error)
GetConfigurations() iter.Seq[[]byte]
NewBatch() StateBatch
}
type VFSCache ¶
type VFSCache struct {
// contains filtered or unexported fields
}
func (*VFSCache) GetCachedPath ¶ added in v1.0.3
Source Files
¶
Click to show internal directories.
Click to hide internal directories.