Versions in this module Expand all Collapse all v0 v0.2.0 May 22, 2020 v0.1.0 Sep 13, 2019 Changes in this version + const EMBEDDED_DATA_OFFSET + const END_OF_RECORDS_SIZE + const GC_COUNT_IN_SIDE_JOB + const GC_QUEUE_SIZE + const LENGTH_SIZE + const LUMPID_SIZE + const PORTION_SIZE + const RECORD_HEADER_SIZE + const SYNC_INTERVAL + const TAG_DELETE + const TAG_DELETE_RANGE + const TAG_EMBED + const TAG_END_OF_RECORDS + const TAG_GO_TO_FRONT + const TAG_PUT + func InitialJournalRegion(writer io.Writer, sector block.BlockSize) + type BufferedIter struct + func (iter BufferedIter) Close() + func (iter BufferedIter) PopFront() (entry JournalEntry, err error) + type DeleteRange struct + End lump.LumpId + Start lump.LumpId + func (record DeleteRange) CheckSum() uint32 + func (record DeleteRange) ExternalSize() uint32 + func (record DeleteRange) Tag() byte + func (record DeleteRange) WriteTo(w io.Writer) error + type DeleteRecord struct + LumpID lump.LumpId + func (record DeleteRecord) CheckSum() uint32 + func (record DeleteRecord) ExternalSize() uint32 + func (record DeleteRecord) Tag() byte + func (record DeleteRecord) WriteTo(writer io.Writer) error + type DequeueIter struct + func (iter DequeueIter) PopFront() (entry JournalEntry, err error) + type EmbedRecord struct + Data []byte + LumpID lump.LumpId + func (record EmbedRecord) CheckSum() uint32 + func (record EmbedRecord) ExternalSize() uint32 + func (record EmbedRecord) Tag() byte + func (record EmbedRecord) WriteTo(w io.Writer) error + type EndOfRecords struct + func (record EndOfRecords) CheckSum() uint32 + func (record EndOfRecords) ExternalSize() uint32 + func (record EndOfRecords) Tag() byte + func (record EndOfRecords) WriteTo(writer io.Writer) (err error) + type GoToFront struct + func (record GoToFront) CheckSum() uint32 + func (record GoToFront) ExternalSize() uint32 + func (record GoToFront) Tag() byte + func (record GoToFront) WriteTo(writer io.Writer) error + type JournalEntry struct + Record JournalRecord + Start address.Address + func (entry JournalEntry) End() uint64 + type JournalHeaderRegion struct + func NewJournalHeadRegion(nvm nvm.NonVolatileMemory) *JournalHeaderRegion + func (headerRegion *JournalHeaderRegion) ReadFrom() (head uint64, err error) + func (headerRegion *JournalHeaderRegion) WriteTo(head uint64) (err error) + type JournalNvmBuffer struct + func NewJournalNvmBuffer(nvm nvm.NonVolatileMemory) *JournalNvmBuffer + func (jb *JournalNvmBuffer) BlockSize() block.BlockSize + func (jb *JournalNvmBuffer) Capacity() uint64 + func (jb *JournalNvmBuffer) Close() error + func (jb *JournalNvmBuffer) Flush() error + func (jb *JournalNvmBuffer) Position() uint64 + func (jb *JournalNvmBuffer) RawSize() int64 + func (jb *JournalNvmBuffer) Read(buf []byte) (n int, err error) + func (jb *JournalNvmBuffer) Seek(offset int64, whence int) (int64, error) + func (jb *JournalNvmBuffer) Split(p uint64) (nvm.NonVolatileMemory, nvm.NonVolatileMemory, error) + func (jb *JournalNvmBuffer) Sync() error + func (jb *JournalNvmBuffer) Write(buf []byte) (n int, err error) + type JournalRecord interface + CheckSum func() uint32 + ExternalSize func() uint32 + Tag func() byte + WriteTo func(io.Writer) error + func ReadRecordFrom(reader io.Reader) (JournalRecord, error) + type JournalRegion struct + func OpenJournalRegion(nvm nvm.NonVolatileMemory) (*JournalRegion, error) + func (Journal *JournalRegion) Usage() uint64 + func (journal *JournalRegion) GcAllEntries(index *lumpindex.LumpIndex) + func (journal *JournalRegion) GetEmbededData(embeded portion.JournalPortion) (buf []byte, err error) + func (journal *JournalRegion) JournalEntries() (uint64, uint64, uint64, []JournalEntry) + func (journal *JournalRegion) RecordDelete(index *lumpindex.LumpIndex, id lump.LumpId) error + func (journal *JournalRegion) RecordDeleteRange(index *lumpindex.LumpIndex, start, end lump.LumpId) error + func (journal *JournalRegion) RecordEmbed(index *lumpindex.LumpIndex, id lump.LumpId, data []byte) error + func (journal *JournalRegion) RecordPut(index *lumpindex.LumpIndex, id lump.LumpId, data portion.DataPortion) error + func (journal *JournalRegion) RestoreIndex(index *lumpindex.LumpIndex) + func (journal *JournalRegion) RunSideJobOnce(index *lumpindex.LumpIndex) + func (journal *JournalRegion) SetAutomaticGcMode(gc bool) + func (journal *JournalRegion) Sync() + type JournalRingBuffer struct + func NewJournalRingBuffer(nvm *JournalNvmBuffer, head uint64) *JournalRingBuffer + func (ring *JournalRingBuffer) BufferedIter() BufferedIter + func (ring *JournalRingBuffer) Capacity() uint64 + func (ring *JournalRingBuffer) DequeueIter() DequeueIter + func (ring *JournalRingBuffer) DoStoreUsage() + func (ring *JournalRingBuffer) Enqueue(record JournalRecord) (jportion portion.JournalPortion, err error) + func (ring *JournalRingBuffer) Flush() error + func (ring *JournalRingBuffer) Head() uint64 + func (ring *JournalRingBuffer) ReadEmbededBuffer(position uint64, data []byte) (err error) + func (ring *JournalRingBuffer) ReadIter() ReadIter + func (ring *JournalRingBuffer) ReleaseBytesUntil(head uint64) + func (ring *JournalRingBuffer) Sync() error + func (ring *JournalRingBuffer) Tail() uint64 + func (ring *JournalRingBuffer) Usage() uint64 + type PutRecord struct + DataPortion portion.DataPortion + LumpID lump.LumpId + func (record PutRecord) CheckSum() uint32 + func (record PutRecord) ExternalSize() uint32 + func (record PutRecord) Tag() byte + func (record PutRecord) WriteTo(writer io.Writer) error + type ReadIter struct + func (iter ReadIter) PopFront() (entry JournalEntry, err error) + type SeekableReader struct + func (r *SeekableReader) Seek(offset int64, whence int) (off int64, err error)