Documentation ¶
Overview ¶
Package ledger interacts with the ledger dir.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListSnapshotFiles ¶
func ListSnapshotFiles(ledgerDir fs.FS) ([]*types.SnapshotFile, error)
ListSnapshotFiles returns all snapshot files in a ledger dir.
func ListSnapshots ¶
func ListSnapshots(ledgerDir fs.FS) ([]*types.SnapshotInfo, error)
ListSnapshots shows all available snapshots of a ledger dir in the specified FS. Result is sorted by best-to-worst.
func ParseSnapshotFileName ¶
func ParseSnapshotFileName(name string) *types.SnapshotFile
ParseSnapshotFileName parses a snapshot's name.
func SnapshotStat ¶
func SnapshotStat(fs_ fs.FS, snap *types.SnapshotFile) error
SnapshotStat fills stat info into the snapshot file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.