Versions in this module Expand all Collapse all v1 v1.0.1 Dec 19, 2019 Changes in this version + const DefaultPoolSize + const DefaultSegmentCount + type BaseHasher func() hash.Hash + type EOC struct + Hash []byte + func NewEOC(hash []byte) *EOC + func (e *EOC) Error() string + type Hasher struct + func New(p *TreePool) *Hasher + func (h *Hasher) BlockSize() int + func (h *Hasher) Hash() []byte + func (h *Hasher) ReadFrom(r io.Reader) (m int64, err error) + func (h *Hasher) Reset() + func (h *Hasher) ResetWithLength(l []byte) + func (h *Hasher) Size() int + func (h *Hasher) Sum(b []byte) (r []byte) + func (h *Hasher) Write(b []byte) (int, error) + type Node struct + func NewNode(level, index int, parent *Node) *Node + type RefHasher struct + func NewRefHasher(hasher BaseHasher, count int) *RefHasher + func (rh *RefHasher) Hash(d []byte) []byte + type Tree struct + func NewTree(hasher BaseHasher, segmentSize, segmentCount int) *Tree + func (t *Tree) Draw(hash []byte, d int) string + type TreePool struct + Capacity int + SegmentCount int + SegmentSize int + func NewTreePool(hasher BaseHasher, segmentCount, capacity int) *TreePool + func (p *TreePool) Drain(n int) + func (p *TreePool) Release(t *Tree) + func (p *TreePool) Reserve() *Tree