ledger

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDataSection = DefaultEntrySection

DefaultDataSection is to store data indefinitely (except for wiping out & evictions)

View Source
const MaxChapterOffset = 0x00FF_FFFF
View Source
const MaxControlChapterID = MaxChapterID >> 1
View Source
const MaxSectionID = (^SectionID(0)) >> 1
View Source
const RelativeEntry = ControlSection

RelativeEntry is used to reference an entry in the same bundle for filament binding logic on storage side. Used by LineStage and UpdateBundle logic, which are not applicable for ControlSection entries.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChapterID

type ChapterID uint32
const MaxChapterID ChapterID = 0x00FF_FFFF

type ControlLocator

type ControlLocator StorageLocator

func NewControlLocator

func NewControlLocator(chapterID ChapterID, ofs uint32) ControlLocator

func NewDropControlLocator

func NewDropControlLocator(id jet.ExactID, chapterID ChapterID, ofs uint64) ControlLocator

func (ControlLocator) ChapterID

func (v ControlLocator) ChapterID() ChapterID

func (ControlLocator) ChapterOffset

func (v ControlLocator) ChapterOffset() uint32

func (ControlLocator) ExactID

func (v ControlLocator) ExactID() jet.ExactID

func (ControlLocator) IsZero

func (v ControlLocator) IsZero() bool

func (ControlLocator) Offset

func (v ControlLocator) Offset() uint64

type DirectoryEntryFlags

type DirectoryEntryFlags uint16
const (
	FilamentClose DirectoryEntryFlags = 1 << iota
	FilamentLocalStart
	FilamentReopen
)

type DirectoryIndex

type DirectoryIndex uint64

func NewDirectoryIndex

func NewDirectoryIndex(id SectionID, ordinal Ordinal) DirectoryIndex

func (DirectoryIndex) IsZero

func (v DirectoryIndex) IsZero() bool

func (DirectoryIndex) Ordinal

func (v DirectoryIndex) Ordinal() Ordinal

func (DirectoryIndex) SectionID

func (v DirectoryIndex) SectionID() SectionID

func (DirectoryIndex) WithFlags

type DirectoryIndexAndFlags

type DirectoryIndexAndFlags uint64

func (DirectoryIndexAndFlags) DirectoryIndex

func (v DirectoryIndexAndFlags) DirectoryIndex() DirectoryIndex

func (DirectoryIndexAndFlags) Flags

func (DirectoryIndexAndFlags) IsZero

func (v DirectoryIndexAndFlags) IsZero() bool

func (DirectoryIndexAndFlags) Ordinal

func (v DirectoryIndexAndFlags) Ordinal() Ordinal

func (DirectoryIndexAndFlags) SectionID

func (v DirectoryIndexAndFlags) SectionID() SectionID

func (DirectoryIndexAndFlags) WithFlags

func (DirectoryIndexAndFlags) WithIndex

type DropOrdinal

type DropOrdinal uint64

func NewDropOrdinal

func NewDropOrdinal(id jet.ExactID, ordinal Ordinal) DropOrdinal

func NewNoDropOrdinal

func NewNoDropOrdinal(ordinal Ordinal) DropOrdinal

func (DropOrdinal) ExactID

func (v DropOrdinal) ExactID() jet.ExactID

func (DropOrdinal) IsZero

func (v DropOrdinal) IsZero() bool

func (DropOrdinal) Ordinal

func (v DropOrdinal) Ordinal() Ordinal

type ExtensionID

type ExtensionID uint32
const (
	OrdinalSize                       = 4
	SameAsBodyExtensionID ExtensionID = 0
)

type Ordinal

type Ordinal uint32

type SectionID

type SectionID uint16
const (
	// ControlSection is to keep storage management information. Resides outside of drops. Its entries can only be in this section.
	ControlSection SectionID = iota

	// DefaultEntrySection is to store catalog entries of a drop.
	DefaultEntrySection

	// DefaultDustSection is to store data temporarily with no exact guarantees of retention time after finalization.
	DefaultDustSection
)

type StorageLocator

type StorageLocator uint64

func NewLocator

func NewLocator(id SectionID, chapterID ChapterID, ofs uint32) StorageLocator

func NewOffsetLocator

func NewOffsetLocator(id SectionID, ofs uint64) StorageLocator

func (StorageLocator) ChapterID

func (v StorageLocator) ChapterID() ChapterID

func (StorageLocator) ChapterOffset

func (v StorageLocator) ChapterOffset() uint32

func (StorageLocator) IsZero

func (v StorageLocator) IsZero() bool

func (StorageLocator) Offset

func (v StorageLocator) Offset() uint64

func (StorageLocator) SectionID

func (v StorageLocator) SectionID() SectionID

Jump to

Keyboard shortcuts

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