aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-01-17 09:59:03 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-01-17 09:59:03 +0100
commiteda30b4e3010258751c2caf559f72f19b0c3784c (patch)
tree77a994e099a4d943ec64516c125e00e0cda3fdc7
parent3dbb460b6a9f82c159f6cc9beaa64eb9f7782256 (diff)
...
-rw-r--r--internal/hash/hash.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/internal/hash/hash.go b/internal/hash/hash.go
index 8662817..861dd90 100644
--- a/internal/hash/hash.go
+++ b/internal/hash/hash.go
@@ -8,14 +8,18 @@ const (
)
type Hash struct {
- file *os.File
- hash func([]byte) uint32
+ file *os.File
+ BSize uint // hash table bucket size
+ FFactor uint // desired density within the hash table
+ CacheSize uint // suggested maximum size in bytes
+ LOrder uint // byte order for integers in metadata
+ Hash func([]byte) uint32 // user defined hash function
}
func New(file *os.File) *Hash {
return &Hash{
file: file,
- hash: defaultHash,
+ Hash: defaultHash,
}
}