Documentation ¶
Index ¶
Constants ¶
View Source
const HeapBlockDataSize = 64 // Bytes
View Source
const HeapBlockSize = 64 + 8 // Bytes
Variables ¶
View Source
var LOGGER = logger.New()
Functions ¶
This section is empty.
Types ¶
type HeapBlock ¶
type HeapBlock struct { Data [HeapBlockDataSize]byte Next ID }
HeapBlock represents a block in the heap file. This block stores 64 bytes of data with a pointer to the next block. This pointer is the position of the block in the file.
type HeapStore ¶
HeapStore is an abstraction over the binary file that holds dynamically sized data in the database
func (*HeapStore) Read ¶
Read starts reading blocks from id does so till it reaches the end of the linked list (id == -1). All the data in the blocks is appended and returned as a []byte.
Click to show internal directories.
Click to hide internal directories.