2022-08-28 11:21:57 +00:00
|
|
|
// Package internal provides utilities for HiDrive.
|
2022-07-07 17:58:22 +00:00
|
|
|
package internal
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding"
|
|
|
|
"hash"
|
|
|
|
)
|
|
|
|
|
|
|
|
// LevelHash is an internal interface for level-hashes.
|
|
|
|
type LevelHash interface {
|
|
|
|
encoding.BinaryMarshaler
|
|
|
|
encoding.BinaryUnmarshaler
|
|
|
|
hash.Hash
|
|
|
|
// Add takes a position-embedded checksum and adds it to the level.
|
|
|
|
Add(sum []byte)
|
|
|
|
// IsFull returns whether the number of checksums added to this level reached its capacity.
|
|
|
|
IsFull() bool
|
|
|
|
}
|