Documentation ¶
Overview ¶
Package api contains the "public" API/artifacts of the serverless log.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TileNodeKey ¶
TileNodeKey generates keys used in Tile.Nodes array.
Types ¶
type Tile ¶
type Tile struct { // NumLeaves is the number of entries at level 0 of this tile. NumLeaves uint // Nodes stores the log tree nodes. // Nodes are stored linearised using in-order traversal - this isn't completely optimal // in terms of storage for partial tiles, but index calculation is relatively // straight-forward. // Note that only non-ephemeral nodes are stored. Nodes [][]byte }
Tile represents a subtree tile, containing inner nodes of a log tree.
func (Tile) MarshalText ¶
MarshalText implements encoding/TextMarshaller and writes out a Tile instance in the following format:
<hash size in decimal>\n <num tile leaves in decimal>\n <Nodes[0] base64 encoded>\n ... <Nodes[n] base64 encoded>\n
func (*Tile) UnmarshalText ¶
UnmarshalText implements encoding/TextUnmarshaler and reads tiles which were written by the MarshalText method above.
Click to show internal directories.
Click to hide internal directories.