Versions in this module Expand all Collapse all v0 v0.1.1 Oct 1, 2023 v0.1.0 Sep 29, 2023 Changes in this version + const PrefixIndexer + const PrefixLedger + const PrefixPeer + func WithBaseDir(baseDir string) options.Option[Manager] + func WithDBProvider(provider DBProvider) options.Option[Manager] + func WithGranularity(granularity int64) options.Option[Manager] + func WithMaxOpenDBs(optsMaxOpenDBs int) options.Option[Manager] + type CacheTimeProvider struct + func NewCacheTimeProvider(forceCacheTime time.Duration) *CacheTimeProvider + func (m *CacheTimeProvider) CacheTime(duration time.Duration) objectstorage.Option + type DB interface + Close func() error + GC func() error + NewStore func() kvstore.KVStore + RequiresGC func() bool + func NewDB(dirname string) (DB, error) + func NewMemDB(string) (DB, error) + type DBProvider func(dirname string) (DB, error) + type IndexedKey interface + type Manager struct + func NewManager(version Version, opts ...options.Option[Manager]) *Manager + func (m *Manager) Flush(index slot.Index) + func (m *Manager) Get(index slot.Index, realm kvstore.Realm) kvstore.KVStore + func (m *Manager) IsTooOld(index slot.Index) (isTooOld bool) + func (m *Manager) MaxPrunedSlot() slot.Index + func (m *Manager) PermanentStorage() kvstore.KVStore + func (m *Manager) PermanentStorageSize() int64 + func (m *Manager) PrunableStorageSize() int64 + func (m *Manager) PruneUntilSlot(index slot.Index) + func (m *Manager) RestoreFromDisk() (latestBucketIndex slot.Index) + func (m *Manager) Shutdown() + func (m *Manager) TotalStorageSize() int64 + type PersistentSlotStorage struct + func NewPersistentSlotStorage(dbManager *Manager, realm kvstore.Realm) *PersistentSlotStorage[K, V, KPtr, VPtr] + func (p *PersistentSlotStorage[K, V, KPtr, VPtr]) Delete(key K) (success bool) + func (p *PersistentSlotStorage[K, V, KPtr, VPtr]) Get(key K) (value V, exists bool) + func (p *PersistentSlotStorage[K, V, KPtr, VPtr]) Iterate(index slot.Index, callback func(key K, value V) (advance bool), ...) (err error) + func (p *PersistentSlotStorage[K, V, KPtr, VPtr]) Set(key K, value V) (err error) + type Version byte + func (v *Version) Bytes() (bytes []byte, err error) + func (v *Version) FromBytes(bytes []byte) (consumedBytes int, err error)