memstor

package
v0.0.0-...-05bc493 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MinStoragePageSize = directoryEntrySize * 16

Variables

View Source
var ErrCtlRecNotFound = throw.E("control record not found")
View Source
var ErrIndexSectionMismatch = throw.E("section mismatch by index")
View Source
var ErrIndexUnknownOrdinal = throw.E("unknown ordinal by index")
View Source
var ErrInvalidOrdinalIndex = throw.E("ordinal index has wrong size")

Functions

This section is empty.

Types

type DirectoryMap

type DirectoryMap interface {
	FindLocator(reference.Holder) ledger.StorageLocator
	FindOrdinal(reference.Holder) ledger.Ordinal
	GetByOrdinal(ledger.Ordinal) ledger.StorageLocator
}

type MemoryStorageReader

type MemoryStorageReader struct {
	// contains filtered or unexported fields
}

func NewMemoryStorageReaderFromWriter

func NewMemoryStorageReaderFromWriter(w *MemoryStorageWriter) MemoryStorageReader

func (MemoryStorageReader) FindDirectoryEntry

func (v MemoryStorageReader) FindDirectoryEntry(id ledger.SectionID, ref reference.Holder) (ledger.Ordinal, error)

func (MemoryStorageReader) FindDirectoryEntryLocator

func (v MemoryStorageReader) FindDirectoryEntryLocator(id ledger.SectionID, ref reference.Holder) (ledger.StorageLocator, error)

func (MemoryStorageReader) FinderOfFirst

func (MemoryStorageReader) FinderOfLast

func (MemoryStorageReader) FinderOfNext

func (MemoryStorageReader) GetDirectoryEntryLocator

func (v MemoryStorageReader) GetDirectoryEntryLocator(index ledger.DirectoryIndex) (ledger.StorageLocator, error)

func (MemoryStorageReader) GetEntryStorage

func (v MemoryStorageReader) GetEntryStorage(locator ledger.StorageLocator) (readbundle.Slice, error)

func (MemoryStorageReader) GetPayloadStorage

func (v MemoryStorageReader) GetPayloadStorage(locator ledger.StorageLocator, size int) (readbundle.Slice, error)

type MemoryStorageWriter

type MemoryStorageWriter struct {
	// contains filtered or unexported fields
}

func NewMemoryStorageWriter

func NewMemoryStorageWriter(pn pulse.Number, maxSection ledger.SectionID, pageSize int) *MemoryStorageWriter

func (*MemoryStorageWriter) DirtyReader

func (p *MemoryStorageWriter) DirtyReader() bundle.DirtyReader

func (*MemoryStorageWriter) GetDirectoryEntries

func (p *MemoryStorageWriter) GetDirectoryEntries(section ledger.SectionID) [][]bundle.DirectoryEntry

func (*MemoryStorageWriter) GetDirectoryEntry

func (p *MemoryStorageWriter) GetDirectoryEntry(index ledger.DirectoryIndex) bundle.DirectoryEntry

func (*MemoryStorageWriter) GetDirectoryEntryLocator

func (p *MemoryStorageWriter) GetDirectoryEntryLocator(index ledger.DirectoryIndex) (ledger.StorageLocator, error)

func (*MemoryStorageWriter) GetEntryStorage

func (p *MemoryStorageWriter) GetEntryStorage(locator ledger.StorageLocator) (readbundle.Slice, error)

func (*MemoryStorageWriter) GetPayloadStorage

func (p *MemoryStorageWriter) GetPayloadStorage(locator ledger.StorageLocator, size int) (readbundle.Slice, error)

func (*MemoryStorageWriter) IsReadOnly

func (p *MemoryStorageWriter) IsReadOnly() bool

func (*MemoryStorageWriter) MarkReadOnly

func (p *MemoryStorageWriter) MarkReadOnly() error

func (*MemoryStorageWriter) PulseNumber

func (p *MemoryStorageWriter) PulseNumber() pulse.Number

func (*MemoryStorageWriter) TakeSnapshot

func (p *MemoryStorageWriter) TakeSnapshot() (bundle.Snapshot, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL