Documentation
¶
Index ¶
Constants ¶
View Source
const (
NodeSize = 32
)
Variables ¶
This section is empty.
Functions ¶
func RootHeightFromWidth ¶
Types ¶
type CacheReader ¶
type CacheReader interface { Layers() map[uint]LayerReadWriter GetLayerReader(layerHeight uint) LayerReader GetHashFunc() HashFunc GetLayerFactory() LayerFactory GetCachingPolicy() CachingPolicy }
type CacheWriter ¶
type CacheWriter interface { SetLayer(layerHeight uint, rw LayerReadWriter) GetLayerWriter(layerHeight uint) (LayerWriter, error) SetHash(hashFunc HashFunc) GetReader() (CacheReader, error) }
type CachingPolicy ¶
type LayerFactory ¶
type LayerFactory func(layerHeight uint) (LayerReadWriter, error)
type LayerReadWriter ¶
type LayerReadWriter interface { Seek(index uint64) error ReadNext() ([]byte, error) Width() (uint64, error) Append(p []byte) (n int, err error) Flush() error Close() error }
LayerReadWriter is a combined reader-writer. Note that the Seek() method only belongs to the LayerReader interface and does not affect the LayerWriter.
type LayerReader ¶
Click to show internal directories.
Click to hide internal directories.