Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
Base is the base struct for all segment types.
func NewFromSnapshotDataDirectory ¶ added in v0.74.0
func (Base) GetChainId ¶
func (Base) GetDatabaseVersion ¶
func (Base) GetFromHeight ¶
func (Base) GetToHeight ¶
func (Base) SnapshotDataDirectory ¶ added in v0.74.0
func (Base) ZipFileName ¶
type ContiguousHistory ¶
ContiguousHistory is a list of ordered contiguous segments.
func NewChunkFromSegment ¶
func NewChunkFromSegment[T blockSpanner](segment T) ContiguousHistory[T]
NewChunkFromSegment returns a chunk containing a single segment.
func (*ContiguousHistory[T]) Add ¶
func (c *ContiguousHistory[T]) Add(new T) bool
Add attempts to insert new segment to the chunk, either at the beginning or at the end. It returns true if the segment was added, false if the new segment doesn't lead or follow our current range.
func (ContiguousHistory[T]) Slice ¶
func (c ContiguousHistory[T]) Slice(from int64, to int64) ContiguousHistory[T]
Slice returns a new chunk containing the segments which partially or fully fall into the specified range.
type Full ¶
Full is a segment that has been added to the store and has been assigned a segment ID.
func (Full) GetHistorySegmentId ¶
type MetaData ¶
MetaData adds a PreviousHistorySegmentID, and is the struct that gets serialized into the JSON metadata when a segment is added to the store.
func (MetaData) GetPreviousHistorySegmentId ¶
type Segments ¶
type Segments[T blockSpanner] []T
Segments is just a list of segments with a bit of syntactic sugar for getting contiguous histories of segments in a nice way.
func (Segments[T]) AllContigousHistories ¶
func (s Segments[T]) AllContigousHistories() []ContiguousHistory[T]
func (Segments[T]) ContiguousHistoryInRange ¶
func (s Segments[T]) ContiguousHistoryInRange(fromHeight int64, toHeight int64) (ContiguousHistory[T], error)
func (Segments[T]) MostRecentContiguousHistory ¶
func (s Segments[T]) MostRecentContiguousHistory() (ContiguousHistory[T], error)
type Staged ¶
Staged is a segment which has been added to the store and then fetched back again.
func (Staged) ZipFilePath ¶
type Unpublished ¶
Unpublished is a segment that has just been dumped from the database into a zip file but hasn't yet been added to the store so doesn't have any extra metadata.
func (Unpublished) InProgressFilePath ¶
func (s Unpublished) InProgressFilePath() string
func (Unpublished) UnpublishedSnapshotDataDirectory ¶ added in v0.74.0
func (s Unpublished) UnpublishedSnapshotDataDirectory() string