mirror of
https://github.com/taigrr/bitcask
synced 2025-01-18 04:03:17 -08:00
* avoid unnecessary use of encoder/decoder to decrease memory allocations * add an optional configurable mempool to avoid extra allocs * add doc.go with examples
15 lines
222 B
Go
15 lines
222 B
Go
package bitcask
|
|
|
|
func Example() {
|
|
_, _ = Open("path/to/db")
|
|
}
|
|
|
|
func Example_withOptions() {
|
|
opts := []Option{
|
|
WithMaxKeySize(1024),
|
|
WithMaxValueSize(4096),
|
|
WithMemPool(10),
|
|
}
|
|
_, _ = Open("path/to/db", opts...)
|
|
}
|