package
2.2.26+incompatible
Repository: https://github.com/gochain/gochain.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

ChecksumFileSegment calculates the checksum for the file segment at path.
IsDBDir returns true if path contains an ethdb.DB.
IsLevelDBDir returns true if path contains a goleveldb database.
KeyBlockNumber returns the block number for a given key and returns ok true.
NewBlockNumberPartitioner returns a new instance of BlockNumberPartitioner.
NewConfig returns a new instance of Config with defaults set.
NewDB returns a new instance of DB.
NewFileSegment returns a new instance of FileSegment.
NewFileSegmentCompactor returns a new instance of FileSegmentCompactor.
No description provided by the author
NewFileSegmentOpener returns a new instance of FileSegmentOpener.
NewLDBSegment returns a LevelDB-based database segment.
No description provided by the author
No description provided by the author
NewSegmentSet returns a new instance of SegmentSet.
NewTable returns a new instance of Table.
SegmentFileType returns the file type at path.
SortSegments sorts a by name.
UncompactSegmentTo writes an LDB segment from a file segment.
VerifyFileSegment compares the calculated and stored checksum of the segment at path.

# Constants

Prefix used for each table type.
Prefix used for each table type.
Prefix used for each table type.
Prefix used for each table type.
Configuration defaults.
DefaultMinCompactionAge is the minimum age after creation before an LDB segment can be compacted into a file segment.
DefaultMinMutableSegmentCount is the minimum number of mutable segments on a given table.
DefaultPartitionSize is the default number of blocks per partition.
FileSegmentChecksumSize is the size of the checksum, in bytes.
FileSegmentHeaderSize is the total size of the fixed length FileSegment header.
FileSegmentIndexCapacitySize is the size of the index capacity, in bytes.
FileSegmentIndexCountSize is the size of the index element count, in bytes.
FileSegmentIndexOffsetSize is the size of the index offset, in bytes.
FileSegmentMagic is the magic number at the beginning of the file segment.
Prefix used for each table type.
Code using batches should try to add this much data to the batch.
Prefix used for each table type.
Segment file types.
Segment file types.

# Variables

No description provided by the author
No description provided by the author
Database errors.
No description provided by the author

# Structs

BlockNumberPartitioner represents a partitioner that returns a partition based on block number.
No description provided by the author
DB is the top-level database and contains a mixture of LevelDB & File storage layers.
FileSegment represents an immutable key/value file segment for a table.
FileSegmentCompactor locally compacts LDB segments into file segments.
FileSegmentEncoder represents a encoder for building a ethdb.FileSegment.
FileSegmentIterator returns an error for sequentially iterating over a FileSegment's key/value pairs.
FileSegmentOpener initializes and opens segments.
LDBSegement represents a mutable segment in a Table.
* This is a test memory database.
SegmentSet represents a set of segments.
StaticPartitioner represents a partitioner that always returns the same partition name.
Table represents key/value storage for a particular data type.

# Interfaces

MutableSegment represents a segment that can be altered.
Partitioner represents an object that returns a partition name for a given key.
Segment represents a subset of Table data.
SegmentCompactor represents an object that can compact from an LDB segment to an immutable segment and back.
SegmentIterator represents a sequentially iterator over all the key/value pairs inside a segment.
SegmentOpener represents an object that can instantiate and load an immutable segment.

# Type aliases

PartitionFunc implements Partitioner.