Documentation
¶
Overview ¶
Package layout contains routines for specifying the on-disk layout of the stored log. This will be used by both the storage package, as well as clients accessing the stored data either directly or via some other transport.
Index ¶
- Constants
- func LeafPath(root string, leafhash []byte) (string, string)
- func NodeCoordsToTileAddress(treeLevel, treeIndex uint64) (uint64, uint64, uint, uint64)
- func PartialTileSize(level, index, logSize uint64) uint64
- func SeqFromPath(root, seqPath string) (uint64, error)
- func SeqPath(root string, seq uint64) (string, string)
- func TilePath(root string, level, index, partialTileSize uint64) (string, string)
Constants ¶
const (
// CheckpointPath is the location of the file containing the log checkpoint.
CheckpointPath = "checkpoint"
)
Variables ¶
This section is empty.
Functions ¶
func LeafPath ¶
LeafPath builds the directory path and relative filename for the entry data with the given leafhash.
func NodeCoordsToTileAddress ¶
NodeCoordsToTileAddress returns the (TileLevel, TileIndex) in tile-space, and the (NodeLevel, NodeIndex) address within that tile of the specified tree node co-ordinates.
func PartialTileSize ¶
PartialTileSize returns the expected number of leaves in a tile at the given location within a tree of the specified logSize, or 0 if the tile is expected to be fully populated.
func SeqFromPath ¶
SeqFromPath recovers a sequence number from the specified path. The path must have been generated with the SeqPath method in this package.
func SeqPath ¶
SeqPath builds the directory path and relative filename for the entry at the given sequence number.
Types ¶
This section is empty.